gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] branch master updated: detect reserve_pub duplicates


From: gnunet
Subject: [libeufin] branch master updated: detect reserve_pub duplicates
Date: Fri, 08 Jul 2022 16:56:03 +0200

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

ms pushed a commit to branch master
in repository libeufin.

The following commit(s) were added to refs/heads/master by this push:
     new c64384fd detect reserve_pub duplicates
c64384fd is described below

commit c64384fdfbe57cb919ead40021f9e5c1f88ad037
Author: MS <ms@taler.net>
AuthorDate: Fri Jul 8 16:55:58 2022 +0200

    detect reserve_pub duplicates
---
 nexus/src/main/kotlin/tech/libeufin/nexus/Taler.kt | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/Taler.kt 
b/nexus/src/main/kotlin/tech/libeufin/nexus/Taler.kt
index 202453ed..e4ac0209 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/Taler.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/Taler.kt
@@ -279,6 +279,11 @@ fun talerFilter(payment: NexusBankTransactionEntity, 
txDtls: TransactionDetails)
         // FIXME: send back!
         return
     }
+    // Check if reserve_pub was used already
+    val maybeExist = TalerIncomingPaymentEntity.find {
+        TalerIncomingPaymentsTable.reservePublicKey eq reservePub
+    }.firstOrNull()
+    if (maybeExist != null) throw conflict("Reserve pub '$reservePub' was used 
already")
 
     if (!CryptoUtil.checkValidEddsaPublicKey(reservePub)) {
         // FIXME: send back!

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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