gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] 01/03: remove unnecessary check (DB should complain there)


From: gnunet
Subject: [libeufin] 01/03: remove unnecessary check (DB should complain there)
Date: Wed, 10 Jun 2020 08:47:38 +0200

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

dold pushed a commit to branch master
in repository libeufin.

commit 759783e16f9d227a040b528d44a0b6900e59d112
Author: Florian Dold <florian.dold@gmail.com>
AuthorDate: Wed Jun 10 11:59:56 2020 +0530

    remove unnecessary check (DB should complain there)
---
 nexus/src/main/kotlin/tech/libeufin/nexus/DB.kt | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/DB.kt 
b/nexus/src/main/kotlin/tech/libeufin/nexus/DB.kt
index 15a79bf..ce75acd 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/DB.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/DB.kt
@@ -64,22 +64,7 @@ object TalerIncomingPayments : LongIdTable() {
 }
 
 class TalerIncomingPaymentEntity(id: EntityID<Long>) : LongEntity(id) {
-    companion object : 
LongEntityClass<TalerIncomingPaymentEntity>(TalerIncomingPayments) {
-        override fun new(init: TalerIncomingPaymentEntity.() -> Unit): 
TalerIncomingPaymentEntity {
-            val newRow = super.new(init)
-            /**
-             * In case the exchange asks for all the values strictly lesser 
than MAX_VALUE,
-             * it would lose the row whose id == MAX_VALUE.  So the check 
below makes this
-             * situation impossible by disallowing MAX_VALUE as a id value.
-             */
-            if (newRow.id.value == Long.MAX_VALUE) {
-                throw NexusError(
-                    HttpStatusCode.InsufficientStorage, "Cannot store rows 
anymore"
-                )
-            }
-            return newRow
-        }
-    }
+    companion object : 
LongEntityClass<TalerIncomingPaymentEntity>(TalerIncomingPayments)
     var payment by RawBankTransactionEntity referencedOn 
TalerIncomingPayments.payment
     var valid by TalerIncomingPayments.valid
     var refunded by TalerIncomingPayments.refunded

-- 
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]