gnunet-svn
[Top][All Lists]
Advanced

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

[taler-deployment] branch master updated: NLnet task 5.


From: gnunet
Subject: [taler-deployment] branch master updated: NLnet task 5.
Date: Wed, 02 Aug 2023 15:15:27 +0200

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

ms pushed a commit to branch master
in repository deployment.

The following commit(s) were added to refs/heads/master by this push:
     new 2b6efc1  NLnet task 5.
2b6efc1 is described below

commit 2b6efc17cc2f4da9f3f5a15572fafb42f4326bd9
Author: MS <ms@taler.net>
AuthorDate: Wed Aug 2 15:12:39 2023 +0200

    NLnet task 5.
    
    Getting the demonstrator of time-framed bank
    histories to pass.
---
 nlnet/task5/date-range/Dockerfile |  2 +-
 nlnet/task5/date-range/start.sh   | 61 +++++++++++++++++++++++++++++++--------
 2 files changed, 50 insertions(+), 13 deletions(-)

diff --git a/nlnet/task5/date-range/Dockerfile 
b/nlnet/task5/date-range/Dockerfile
index e3ebca5..8d1224f 100644
--- a/nlnet/task5/date-range/Dockerfile
+++ b/nlnet/task5/date-range/Dockerfile
@@ -6,7 +6,7 @@ RUN apt-get install -y openjdk-17-jre git python3-pip curl jq 
sqlite3 postgresql
 # Installation
 RUN git clone git://git.taler.net/libeufin
 WORKDIR /libeufin
-RUN git fetch && git checkout 934a73b09b9e9abba348e15ddc058df5bb9cd6a3
+RUN git fetch && git checkout a614d433a8307468f1074114086ae0a47b848472
 RUN ./bootstrap
 RUN ./configure --prefix=/usr/local
 RUN make install
diff --git a/nlnet/task5/date-range/start.sh b/nlnet/task5/date-range/start.sh
index 2d41c8a..226084c 100755
--- a/nlnet/task5/date-range/start.sh
+++ b/nlnet/task5/date-range/start.sh
@@ -1,6 +1,15 @@
 #!/bin/bash
 
-# Draft.
+# This script shows how Nexus can request histories from
+# a particular time frame.  Such request must succeed via
+# two connection types: EBICS and x-libeufin-bank.  EBICS
+# ensures the fetching of fiat payments made to the regional
+# currency authority, whereas x-libeufin-bank does it for
+# the regional currency circuit.  Note: the time-framed
+# request is exceptional: it's used only after a complaint
+# from a user where they didn't get their funds as expected.
+
+set -eux
 
 service postgresql start
 sudo -u postgres createuser -s root
@@ -77,22 +86,50 @@ libeufin-cli connections import-bank-account \
   --nexus-bank-account-id bar-at-nexus ebicsconn
 echo OK
 
-exit
+FIRST_JAN_2020="1577833200000" # in milliseconds
+END_DEC_2019="2019-12-30" # "1577660400000"
+MID_JAN_2020="2020-01-15" #"1579042800000"
+
 # 0, setup and start services.
 libeufin-sandbox make-transaction \
   --credit-account=admin \
   --debit-account=sandbox-user MANA:2 \
+  "task5" # subject.
 
 # 1, set artificial time for the transaction at $PAST.
-# 2, retrieve the $PAST transaction via Nexus.
+echo "UPDATE bankaccounttransactions SET date='$FIRST_JAN_2020' WHERE 
subject='task5'" | psql -q -d libeufincheck
+
+# 2, retrieve the transaction via Nexus, for both connections.
+# This should get only ONE transaction.
+libeufin-cli \
+  accounts \
+    fetch-transactions \
+      --level=report \
+      --range-type=time-range \
+      --start=$END_DEC_2019 \
+      --end=$MID_JAN_2020 \
+      bar-at-nexus > /dev/null # EBICS
+
 libeufin-cli \
-  connections \
+  accounts \
+    transactions \
+      bar-at-nexus
+
+echo "DELETE FROM nexusbanktransactions" | psql -d libeufincheck
+echo "DELETE FROM nexusbankmessages" | psql -d libeufincheck
+
+libeufin-cli \
+  accounts \
     fetch-transactions \
-      --range-type=time-frame \
-      --start $START \
-      --end $END
-# 3, show ingested transactions, where only $PATH appears.
-libeufin-cli
-  accounts
-    list-payments
-      $OTHER_ARGS
+      --level=statement \
+      --range-type=time-range \
+      --start=$END_DEC_2019 \
+      --end=$MID_JAN_2020 \
+      foo-at-nexus # x-libeufin-bank
+
+libeufin-cli \
+  accounts \
+    transactions \
+      foo-at-nexus
+
+bash

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