gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] 01/02: clean up nexus mess not needed in auditor anymor


From: gnunet
Subject: [taler-exchange] 01/02: clean up nexus mess not needed in auditor anymore
Date: Sun, 24 Mar 2024 14:51:06 +0100

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

grothoff pushed a commit to branch master
in repository exchange.

commit c19e2666aa496957b13c438480b6d8ceaefba460
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sun Mar 24 14:48:48 2024 +0100

    clean up nexus mess not needed in auditor anymore
---
 src/auditor/setup.sh           | 85 ++++++------------------------------------
 src/auditor/test-auditor.sh    | 34 -----------------
 src/auditor/test-kyc.sh        | 38 +------------------
 src/auditor/test-revocation.sh | 12 ------
 4 files changed, 13 insertions(+), 156 deletions(-)

diff --git a/src/auditor/setup.sh b/src/auditor/setup.sh
index 9ca0fe07..fb7932ac 100755
--- a/src/auditor/setup.sh
+++ b/src/auditor/setup.sh
@@ -63,38 +63,20 @@ function get_payto_uri() {
     export LIBEUFIN_SANDBOX_USERNAME="$1"
     export LIBEUFIN_SANDBOX_PASSWORD="$2"
     export LIBEUFIN_SANDBOX_URL="http://localhost:18082";
-    echo "broken"
+    echo "get_payto_uri currently not implemented"
     exit 1
 #    libeufin-cli sandbox demobank info --bank-account "$1" | jq --raw-output 
'.paytoUri'
 }
 
-function get_bankaccount_transactions() {
-    export LIBEUFIN_SANDBOX_USERNAME=$1
-    export LIBEUFIN_SANDBOX_PASSWORD=$2
-    export LIBEUFIN_SANDBOX_URL="http://localhost:18082";
-    echo "broken"
-    exit 1
-#    libeufin-cli sandbox demobank list-transactions --bank-account $1
-}
-
-
-# Stop libeufin sandbox and nexus (if running)
+# Stop libeufin-bank (if running)
 function stop_libeufin()
 {
     echo -n "Stopping libeufin... "
-    if [ -f "${MY_TMP_DIR:-/}/libeufin-sandbox.pid" ]
-    then
-        PID=$(cat "${MY_TMP_DIR}/libeufin-sandbox.pid" 2> /dev/null)
-        echo "Killing libeufin sandbox $PID"
-        rm "${MY_TMP_DIR}/libeufin-sandbox.pid"
-        kill "$PID" 2> /dev/null || true
-        wait "$PID" || true
-    fi
-    if [ -f "${MY_TMP_DIR:-/}/libeufin-nexus.pid" ]
+    if [ -f "${MY_TMP_DIR:-/}/libeufin-bank.pid" ]
     then
-        PID=$(cat "${MY_TMP_DIR}/libeufin-nexus.pid" 2> /dev/null)
-        echo "Killing libeufin nexus $PID"
-        rm "${MY_TMP_DIR}/libeufin-nexus.pid"
+        PID=$(cat "${MY_TMP_DIR}/libeufin-bank.pid" 2> /dev/null)
+        echo "Killing libeufin-bank $PID"
+        rm "${MY_TMP_DIR}/libeufin-bank.pid"
         kill "$PID" 2> /dev/null || true
         wait "$PID" || true
     fi
@@ -103,55 +85,10 @@ function stop_libeufin()
 
 
 function launch_libeufin () {
-# shellcheck disable=SC2016
-    export LIBEUFIN_SANDBOX_DB_CONNECTION="postgresql:///${DB}"
-    libeufin-sandbox serve \
+    libeufin-bank serve \
                      --no-auth \
-                     --port 18082 \
-                     > "${MY_TMP_DIR}/libeufin-sandbox-stdout.log" \
-                     2> "${MY_TMP_DIR}/libeufin-sandbox-stderr.log" &
-    echo $! > "${MY_TMP_DIR}/libeufin-sandbox.pid"
-# shellcheck disable=SC2016
-    export LIBEUFIN_NEXUS_DB_CONNECTION="postgresql:///${DB}"
-    libeufin-nexus serve \
-                   --port 8082 \
-                   2> "${MY_TMP_DIR}/libeufin-nexus-stderr.log" \
-                   > "${MY_TMP_DIR}/libeufin-nexus-stdout.log" &
-    echo $! > "${MY_TMP_DIR}/libeufin-nexus.pid"
-}
-
-
-
-# Downloads new transactions from the bank.
-function nexus_fetch_transactions () {
-    export LIBEUFIN_NEXUS_USERNAME="exchange"
-    export LIBEUFIN_NEXUS_PASSWORD="x"
-    export LIBEUFIN_NEXUS_URL="http://localhost:8082/";
-    echo "broken"
-    exit 1
-#    libeufin-cli accounts \
-#                 fetch-transactions \
-#                 --range-type since-last \
-#                 --level report \
-#                 exchange-nexus > /dev/null
-    unset LIBEUFIN_NEXUS_USERNAME
-    unset LIBEUFIN_NEXUS_PASSWORD
-    unset LIBEUFIN_NEXUS_URL
-}
-
-
-# Instruct Nexus to all the prepared payments (= those
-# POSTed to /transfer by the exchange).
-function nexus_submit_to_sandbox () {
-    export LIBEUFIN_NEXUS_USERNAME="exchange"
-    export LIBEUFIN_NEXUS_PASSWORD="x"
-    export LIBEUFIN_NEXUS_URL="http://localhost:8082/";
-    echo "broken"
-    exit 1
-#    libeufin-cli accounts \
-#                 submit-payments\
-#                 exchange-nexus
-    unset LIBEUFIN_NEXUS_USERNAME
-    unset LIBEUFIN_NEXUS_PASSWORD
-    unset LIBEUFIN_NEXUS_URL
+                     --port 8082 \
+                     > "${MY_TMP_DIR}/libeufin-bank-stdout.log" \
+                     2> "${MY_TMP_DIR}/libeufin-bank-stderr.log" &
+    echo $! > "${MY_TMP_DIR}/libeufin-bank.pid"
 }
diff --git a/src/auditor/test-auditor.sh b/src/auditor/test-auditor.sh
index 80a59282..c9fa475a 100755
--- a/src/auditor/test-auditor.sh
+++ b/src/auditor/test-auditor.sh
@@ -163,13 +163,6 @@ function pre_audit () {
             2> "${MY_TMP_DIR}/transfer.log" \
             || exit_fail "FAIL"
         echo " DONE"
-           echo -n "Running Nexus payment submitter ..."
-           nexus_submit_to_sandbox
-           echo " DONE"
-           # Make outgoing transactions appear in the TWG:
-           echo -n "Download bank transactions ..."
-           nexus_fetch_transactions
-           echo " DONE"
     fi
 }
 
@@ -369,33 +362,6 @@ function run_audit () {
             2> "${MY_TMP_DIR}/drain-transfer.log" \
             || exit_fail "FAIL"
         echo " DONE"
-
-        export LIBEUFIN_NEXUS_USERNAME="exchange"
-        export LIBEUFIN_NEXUS_PASSWORD="x"
-        export LIBEUFIN_NEXUS_URL="http://localhost:8082/";
-
-        #PAIN_UUID=$(libeufin-cli accounts list-payments exchange-nexus | jq 
.initiatedPayments[] | jq 'select(.submitted==false)' | jq -r 
.paymentInitiationId)
-#        if test -z "${PAIN_UUID}"
-#        then
-#            echo -n "Payment likely already submitted, running 
submit-payments without UUID anyway ..."
-#            libeufin-cli accounts \
-#                         submit-payments \
-#                         exchange-nexus
-#        else
-#            echo -n "Running payment submission for transaction ${PAIN_UUID} 
..."
-#            libeufin-cli accounts \
-#                         submit-payments \
-#                         --payment-uuid "${PAIN_UUID}" \
-#                         exchange-nexus
-#        fi
-#        echo " DONE"
-#        echo -n "Import outgoing transactions..."
-#        libeufin-cli accounts \
-#                     fetch-transactions \
-#                     --range-type since-last \
-#                     --level report \
-#                     exchange-nexus
-        echo " DONE"
     fi
     audit_only
     post_audit
diff --git a/src/auditor/test-kyc.sh b/src/auditor/test-kyc.sh
index b20e5566..3c3cf014 100755
--- a/src/auditor/test-kyc.sh
+++ b/src/auditor/test-kyc.sh
@@ -373,42 +373,8 @@ function run_audit () {
             || exit_fail "FAIL"
         echo " DONE"
 
-        export LIBEUFIN_NEXUS_USERNAME="exchange"
-        export LIBEUFIN_NEXUS_PASSWORD="x"
-        export LIBEUFIN_NEXUS_URL="http://localhost:8082/";
-    echo "broken"
-    exit 1
-#        PAIN_UUID=$(libeufin-cli accounts list-payments exchange-nexus | jq 
.initiatedPayments[] | jq 'select(.submitted==false)' | jq -r 
.paymentInitiationId)
-        if test -z "${PAIN_UUID}"
-        then
-            echo -n "Payment likely already submitted, running submit-payments 
without UUID anyway ..."
-    echo "broken"
-    exit 1
-#            libeufin-cli accounts \
-#                         submit-payments \
-#                         exchange-nexus
-        else
-            echo -n "Running payment submission for transaction ${PAIN_UUID} 
..."
-    echo "broken"
-    exit 1
-#            libeufin-cli accounts \
-#                         submit-payments \
-#                         --payment-uuid "${PAIN_UUID}" \
-#                         exchange-nexus
-        fi
-        echo " DONE"
-        echo -n "Import outgoing transactions..."
-    echo "broken"
-    exit 1
-#        libeufin-cli accounts \
-#                     fetch-transactions \
-#                     --range-type since-last \
-#                     --level report \
-#                     exchange-nexus
-        echo " DONE"
-    fi
-    audit_only
-    post_audit
+        audit_only
+        post_audit
 }
 
 
diff --git a/src/auditor/test-revocation.sh b/src/auditor/test-revocation.sh
index 924d554e..a80151c4 100755
--- a/src/auditor/test-revocation.sh
+++ b/src/auditor/test-revocation.sh
@@ -89,18 +89,6 @@ function exit_cleanup()
 trap exit_cleanup EXIT
 
 
-function get_payto_uri() {
-    export LIBEUFIN_SANDBOX_USERNAME=$1
-    export LIBEUFIN_SANDBOX_PASSWORD=$2
-    export LIBEUFIN_SANDBOX_URL=http://localhost:18082
-    echo "broken"
-    exit 1
-#    libeufin-cli sandbox demobank info \
-#                 --bank-account "$1" \
-#        | jq --raw-output '.paytoUri'
-}
-
-
 # Operations to run before the actual audit
 function pre_audit () {
     # Launch bank

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