summaryrefslogtreecommitdiff
path: root/src/auditor
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-09-03 04:16:28 +0200
committerChristian Grothoff <christian@grothoff.org>2019-09-03 04:16:28 +0200
commit05b92c243185f3a5e3d4bcc4039aaa0c25f0fadd (patch)
treeaf60d8e4e76d4690e5ab847c0586bd785e8d2c94 /src/auditor
parent380bf67de69245243f58c7427a0c65e4ab4a7ce6 (diff)
downloadexchange-05b92c243185f3a5e3d4bcc4039aaa0c25f0fadd.tar.gz
exchange-05b92c243185f3a5e3d4bcc4039aaa0c25f0fadd.tar.bz2
exchange-05b92c243185f3a5e3d4bcc4039aaa0c25f0fadd.zip
check h_wire/wire consistency
Diffstat (limited to 'src/auditor')
-rw-r--r--src/auditor/taler-auditor.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/auditor/taler-auditor.c b/src/auditor/taler-auditor.c
index 9ef8871e4..ca421cd8f 100644
--- a/src/auditor/taler-auditor.c
+++ b/src/auditor/taler-auditor.c
@@ -2071,6 +2071,28 @@ check_transaction_history_for_deposit (const struct
switch (tl->type)
{
case TALER_EXCHANGEDB_TT_DEPOSIT:
+ /* check wire and h_wire are consistent */
+ {
+ struct GNUNET_HashCode hw;
+
+ if (GNUNET_OK !=
+ TALER_JSON_merchant_wire_signature_hash (
+ tl->details.deposit->receiver_wire_account,
+ &hw))
+ {
+ report_row_inconsistency ("deposits",
+ tl->serial_id,
+ "wire value malformed");
+ }
+ else if (0 !=
+ GNUNET_memcmp (&hw,
+ &tl->details.deposit->h_wire))
+ {
+ report_row_inconsistency ("deposits",
+ tl->serial_id,
+ "h_wire does not match wire");
+ }
+ }
amount_with_fee = &tl->details.deposit->amount_with_fee;
fee = &tl->details.deposit->deposit_fee;
fee_dki = &dki->properties.fee_deposit;