From 8f071e2200f0421caf1969c71a16ed62b3356fb5 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 21 Jan 2016 08:44:45 +0100 Subject: adding aggregation_tracking table to postgres plugin --- src/include/taler_crypto_lib.h | 5 +++++ src/include/taler_mintdb_plugin.h | 29 ++++++++++++++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) (limited to 'src/include') diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h index 36ca6a023..6056270fa 100644 --- a/src/include/taler_crypto_lib.h +++ b/src/include/taler_crypto_lib.h @@ -434,6 +434,11 @@ struct TALER_RefreshLinkDecrypted */ #define TALER_WIRE_TRANSFER_IDENTIFIER_LEN 32 +/** + * #TALER_WIRE_TRANSFER_IDENTIFIER_LEN as a string. + */ +#define TALER_WIRE_TRANSFER_IDENTIFIER_LEN_STR "32" + /** * Raw value of a wire transfer subjects, without the checksum. */ diff --git a/src/include/taler_mintdb_plugin.h b/src/include/taler_mintdb_plugin.h index 9e4f891c5..baf587886 100644 --- a/src/include/taler_mintdb_plugin.h +++ b/src/include/taler_mintdb_plugin.h @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2014, 2015 GNUnet e.V. + Copyright (C) 2014, 2015, 2016 GNUnet e.V. TALER is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -1266,6 +1266,33 @@ struct TALER_MINTDB_Plugin TALER_MINTDB_DepositWtidCallback cb, void *cb_cls); + + /** + * Function called to insert aggregation information into the DB. + * + * @param cls closure + * @param wtid the raw wire transfer identifier we used + * @param merchant_pub public key of the merchant (should be same for all callbacks with the same @e cls) + * @param h_wire hash of wire transfer details of the merchant (should be same for all callbacks with the same @e cls) + * @param h_contract which contract was this payment about + * @param transaction_id merchant's transaction ID for the payment + * @param coin_pub which public key was this payment about + * @param deposit_value amount contributed by this coin in total + * @param deposit_fee deposit fee charged by mint for this coin + * @return #GNUNET_OK on success, #GNUNET_SYSERR on DB errors + */ + int + (*insert_aggregation_tracking)(void *cls, + const struct TALER_WireTransferIdentifierRawP *wtid, + const struct TALER_MerchantPublicKeyP *merchant_pub, + const struct GNUNET_HashCode *h_wire, + const struct GNUNET_HashCode *h_contract, + uint64_t transaction_id, + const struct TALER_CoinSpendPublicKeyP *coin_pub, + const struct TALER_Amount *deposit_value, + const struct TALER_Amount *deposit_fee); + + }; -- cgit v1.2.3