gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] branch master updated: Remove avoidable MsgId value per trans


From: gnunet
Subject: [libeufin] branch master updated: Remove avoidable MsgId value per transaction (sandbox)
Date: Mon, 18 Jan 2021 17:36:31 +0100

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 5c13979  Remove avoidable MsgId value per transaction (sandbox)
5c13979 is described below

commit 5c1397963a939dbe260226b5076636346c20a308
Author: MS <ms@taler.net>
AuthorDate: Mon Jan 18 17:36:10 2021 +0100

    Remove avoidable MsgId value per transaction (sandbox)
---
 sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt                   | 3 +--
 sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt | 1 -
 sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt                 | 4 ----
 sandbox/src/main/kotlin/tech/libeufin/sandbox/bankAccount.kt          | 3 +--
 4 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt 
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt
index 034fcf0..d9e75ae 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt
@@ -258,11 +258,10 @@ object BankAccountTransactionsTable : Table() {
     val currency = text("currency")
     val date = long("date")
     val pmtInfId = text("pmtInfId")
-    val msgId = text("msgId")
     val direction = text("direction")
     val account = reference("account", BankAccountsTable)
 
-    override val primaryKey = PrimaryKey(pmtInfId, msgId)
+    override val primaryKey = PrimaryKey(pmtInfId)
 }
 
 /**
diff --git 
a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt 
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
index 1f8fa82..fc04482 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
@@ -562,7 +562,6 @@ private fun handleCct(paymentRequest: String, 
initiatorName: String, ctx: Reques
                 it[currency] = parseResult.currency
                 it[date] = Instant.now().toEpochMilli()
                 it[pmtInfId] = parseResult.pmtInfId
-                it[msgId] = parseResult.msgId
                 it[direction] = "DBIT"
             }
         } catch (e: ExposedSQLException) {
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt 
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
index ca7cc89..dedcee6 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
@@ -348,7 +348,6 @@ fun serverMain(dbName: String, port: Int) {
                         it[currency] = body.currency
                         it[date] = Instant.now().toEpochMilli()
                         it[pmtInfId] = random.toString()
-                        it[msgId] = random.toString()
                         it[account] = getBankAccountFromIban(localIban).id
                         it[direction] = body.direction
                     }
@@ -376,7 +375,6 @@ fun serverMain(dbName: String, port: Int) {
                         it[currency] = account.currency
                         it[date] = Instant.now().toEpochMilli()
                         it[pmtInfId] = random.toString()
-                        it[msgId] = random.toString()
                         it[BankAccountTransactionsTable.account] = account.id
                         it[direction] = "CRDT"
                     }
@@ -482,7 +480,6 @@ fun serverMain(dbName: String, port: Int) {
                             it[currency] = account.currency
                             it[date] = Instant.now().toEpochMilli()
                             it[pmtInfId] = random.toString()
-                            it[msgId] = random.toString()
                             it[BankAccountTransactionsTable.account] = 
account.id
                             it[direction] = "CRDT"
                         }
@@ -504,7 +501,6 @@ fun serverMain(dbName: String, port: Int) {
                             it[currency] = account.currency
                             it[date] = Instant.now().toEpochMilli()
                             it[pmtInfId] = random.toString()
-                            it[msgId] = random.toString()
                             it[BankAccountTransactionsTable.account] = 
account.id
                             it[direction] = "DBIT"
                         }
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/bankAccount.kt 
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/bankAccount.kt
index 46780f0..c93db81 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/bankAccount.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/bankAccount.kt
@@ -45,8 +45,7 @@ fun historyForAccount(iban: String): List<RawPayment> {
                     // uid = "${it[pmtInfId]}-${it[msgId]}"
                     uid = "${it[BankAccountTransactionsTable.pmtInfId]}",
                     direction = it[BankAccountTransactionsTable.direction],
-                    pmtInfId = it[BankAccountTransactionsTable.pmtInfId],
-                    msgId = it[BankAccountTransactionsTable.msgId]
+                    pmtInfId = it[BankAccountTransactionsTable.pmtInfId]
                 )
             )
         }

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