diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-07-08 12:35:01 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-07-08 12:35:01 +0200 |
commit | 81fec09268d08762e85583650d7bd02fdd7e7de4 (patch) | |
tree | 62333eb2d358fa2762186d2139488f04d68df35a /src/exchange/taler-exchange-aggregator.c | |
parent | 575c10027bc6b6bff2da5e7c485d88ef44c54c65 (diff) | |
download | exchange-81fec09268d08762e85583650d7bd02fdd7e7de4.tar.gz exchange-81fec09268d08762e85583650d7bd02fdd7e7de4.tar.bz2 exchange-81fec09268d08762e85583650d7bd02fdd7e7de4.zip |
simplify DB access: do not fetch fields we do not need
Diffstat (limited to 'src/exchange/taler-exchange-aggregator.c')
-rw-r--r-- | src/exchange/taler-exchange-aggregator.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c index 69c73746..270a1330 100644 --- a/src/exchange/taler-exchange-aggregator.c +++ b/src/exchange/taler-exchange-aggregator.c @@ -507,44 +507,24 @@ deposit_cb (void *cls, * * @param cls a `struct AggregationUnit` * @param row_id identifies database entry - * @param exchange_timestamp when did the exchange receive the deposit - * @param wallet_timestamp when did the wallet sign the contract - * @param merchant_pub public key of the merchant * @param coin_pub public key of the coin * @param amount_with_fee amount that was deposited including fee * @param deposit_fee amount the exchange gets to keep as transaction fees * @param h_contract_terms hash of the proposal data known to merchant and customer - * @param wire_deadline by which the merchant advised that he would like the - * wire transfer to be executed - * @param wire wire details for the merchant * @return transaction status code */ static enum GNUNET_DB_QueryStatus aggregate_cb (void *cls, uint64_t row_id, - struct GNUNET_TIME_Absolute exchange_timestamp, - struct GNUNET_TIME_Absolute wallet_timestamp, - const struct TALER_MerchantPublicKeyP *merchant_pub, const struct TALER_CoinSpendPublicKeyP *coin_pub, const struct TALER_Amount *amount_with_fee, const struct TALER_Amount *deposit_fee, - const struct GNUNET_HashCode *h_contract_terms, - struct GNUNET_TIME_Absolute wire_deadline, - const json_t *wire) + const struct GNUNET_HashCode *h_contract_terms) { struct AggregationUnit *au = cls; struct TALER_Amount old; enum GNUNET_DB_QueryStatus qs; - /* NOTE: potential optimization: use custom SQL API to not - fetch these: */ - (void) wire_deadline; /* checked by SQL */ - (void) exchange_timestamp; - (void) wallet_timestamp; - (void) wire; /* must match */ - GNUNET_break (0 == GNUNET_memcmp (&au->merchant_pub, - merchant_pub)); - if (au->rows_offset >= TALER_EXCHANGEDB_MATCHING_DEPOSITS_LIMIT) { /* Bug: we asked for at most #TALER_EXCHANGEDB_MATCHING_DEPOSITS_LIMIT results! */ |