summaryrefslogtreecommitdiff
path: root/src/auditor/taler-helper-auditor-aggregation.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-02-28 20:37:19 +0100
committerChristian Grothoff <christian@grothoff.org>2022-02-28 20:37:19 +0100
commit23bc09fe3c2ca08ce209fffc0ad0ae3e51b06ef4 (patch)
tree6a9dc253ce596c247a3aac6095205f195198b8d7 /src/auditor/taler-helper-auditor-aggregation.c
parent8f77bda2e0297185c98694edf0d752cc925bf9a2 (diff)
downloadexchange-23bc09fe3c2ca08ce209fffc0ad0ae3e51b06ef4.tar.gz
exchange-23bc09fe3c2ca08ce209fffc0ad0ae3e51b06ef4.tar.bz2
exchange-23bc09fe3c2ca08ce209fffc0ad0ae3e51b06ef4.zip
get test-auditor and #7181 to pass
Diffstat (limited to 'src/auditor/taler-helper-auditor-aggregation.c')
-rw-r--r--src/auditor/taler-helper-auditor-aggregation.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/auditor/taler-helper-auditor-aggregation.c b/src/auditor/taler-helper-auditor-aggregation.c
index b088b615d..33c51731d 100644
--- a/src/auditor/taler-helper-auditor-aggregation.c
+++ b/src/auditor/taler-helper-auditor-aggregation.c
@@ -390,7 +390,7 @@ struct WireCheckContext
* @param[out] deposit_gain amount the coin contributes excluding refunds
* @return #GNUNET_OK on success, #GNUNET_SYSERR if the transaction must fail (hard error)
*/
-static int
+static enum GNUNET_GenericReturnValue
check_transaction_history_for_deposit (
const struct TALER_CoinSpendPublicKeyP *coin_pub,
const struct TALER_PrivateContractHashP *h_contract_terms,
@@ -683,6 +683,7 @@ check_transaction_history_for_deposit (
* @param rowid which row in the table is the information from (for diagnostics)
* @param merchant_pub public key of the merchant (should be same for all callbacks with the same @e cls)
* @param account_pay_uri where did we transfer the funds?
+ * @param h_payto hash over @a account_payto_uri as it is in the DB
* @param exec_time execution time of the wire transfer (should be same for all callbacks with the same @e cls)
* @param h_contract_terms which proposal was this payment about
* @param denom_pub denomination of @a coin_pub
@@ -698,6 +699,7 @@ wire_transfer_information_cb (
uint64_t rowid,
const struct TALER_MerchantPublicKeyP *merchant_pub,
const char *account_pay_uri,
+ const struct TALER_PaytoHashP *h_payto,
struct GNUNET_TIME_Timestamp exec_time,
const struct TALER_PrivateContractHashP *h_contract_terms,
const struct TALER_DenominationPublicKey *denom_pub,
@@ -712,7 +714,18 @@ wire_transfer_information_cb (
struct TALER_EXCHANGEDB_TransactionList *tl;
struct TALER_CoinPublicInfo coin;
enum GNUNET_DB_QueryStatus qs;
+ struct TALER_PaytoHashP hpt;
+ TALER_payto_hash (account_pay_uri,
+ &hpt);
+ if (0 !=
+ GNUNET_memcmp (&hpt,
+ h_payto))
+ {
+ report_row_inconsistency ("wire_targets",
+ rowid,
+ "h-payto does not match payto URI");
+ }
/* Obtain coin's transaction history */
qs = TALER_ARL_edb->get_coin_transactions (TALER_ARL_edb->cls,
coin_pub,