diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-01-21 08:44:45 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-01-21 08:44:45 +0100 |
commit | 8f071e2200f0421caf1969c71a16ed62b3356fb5 (patch) | |
tree | ef5fd95ffe12361c1100472e6e523ae063a51ff6 /src/include | |
parent | 6d80541f70d071e6d4d98d2d30aa04d959431cda (diff) | |
download | exchange-8f071e2200f0421caf1969c71a16ed62b3356fb5.tar.xz |
adding aggregation_tracking table to postgres plugin
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/taler_crypto_lib.h | 5 | ||||
-rw-r--r-- | src/include/taler_mintdb_plugin.h | 29 |
2 files changed, 33 insertions, 1 deletions
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 @@ -435,6 +435,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. */ struct TALER_WireTransferIdentifierRawP 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); + + }; |