gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-exchange] 04/05: check h_wire/wire consistency


From: gnunet
Subject: [GNUnet-SVN] [taler-exchange] 04/05: check h_wire/wire consistency
Date: Tue, 03 Sep 2019 04:29:55 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository exchange.

commit 05b92c243185f3a5e3d4bcc4039aaa0c25f0fadd
Author: Christian Grothoff <address@hidden>
AuthorDate: Tue Sep 3 04:16:28 2019 +0200

    check h_wire/wire consistency
---
 src/auditor/taler-auditor.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/src/auditor/taler-auditor.c b/src/auditor/taler-auditor.c
index 9ef8871e..ca421cd8 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;

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]