summaryrefslogtreecommitdiff
path: root/src/auditor/test-auditor.sh
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-01-08 18:14:46 +0100
committerChristian Grothoff <christian@grothoff.org>2021-01-08 18:14:46 +0100
commit13555448b67f41f1dad97a0116b3f82870c58cbd (patch)
treeadfc2d7a04ba235b81f70634b55af907c1544f7f /src/auditor/test-auditor.sh
parent3999999988878776a977aa27bb6e5097fa24c18a (diff)
downloadexchange-13555448b67f41f1dad97a0116b3f82870c58cbd.tar.gz
exchange-13555448b67f41f1dad97a0116b3f82870c58cbd.tar.bz2
exchange-13555448b67f41f1dad97a0116b3f82870c58cbd.zip
change exchange database to use denominations_serial instead of denom_pub_hash as foreign key
Diffstat (limited to 'src/auditor/test-auditor.sh')
-rwxr-xr-xsrc/auditor/test-auditor.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/auditor/test-auditor.sh b/src/auditor/test-auditor.sh
index 08e13f98..ff5ba1c5 100755
--- a/src/auditor/test-auditor.sh
+++ b/src/auditor/test-auditor.sh
@@ -1303,14 +1303,14 @@ fi
function test_22() {
echo "===========22: denomination key expired ================="
-H_DENOM=`echo 'SELECT denom_pub_hash FROM reserves_out LIMIT 1;' | psql $DB -Aqt`
+S_DENOM=`echo 'SELECT denominations_serial FROM reserves_out LIMIT 1;' | psql $DB -Aqt`
-OLD_START=`echo "SELECT valid_from FROM denominations WHERE denom_pub_hash='${H_DENOM}';" | psql $DB -Aqt`
-OLD_WEXP=`echo "SELECT expire_withdraw FROM denominations WHERE denom_pub_hash='${H_DENOM}';" | psql $DB -Aqt`
+OLD_START=`echo "SELECT valid_from FROM denominations WHERE denominations_serial='${S_DENOM}';" | psql $DB -Aqt`
+OLD_WEXP=`echo "SELECT expire_withdraw FROM denominations WHERE denominations_serial='${S_DENOM}';" | psql $DB -Aqt`
# Basically expires 'immediately', so that the withdraw must have been 'invalid'
NEW_WEXP=`expr $OLD_START + 1 || true`
-echo "UPDATE denominations SET expire_withdraw=${NEW_WEXP} WHERE denom_pub_hash='${H_DENOM}';" | psql -Aqt $DB
+echo "UPDATE denominations SET expire_withdraw=${NEW_WEXP} WHERE denominations_serial='${S_DENOM}';" | psql -Aqt $DB
run_audit
@@ -1321,7 +1321,7 @@ jq -e .denomination_key_validity_withdraw_inconsistencies[0] < test-audit-reserv
echo PASS
# Undo modification
-echo "UPDATE denominations SET expire_withdraw=${OLD_WEXP} WHERE denom_pub_hash='${H_DENOM}';" | psql -Aqt $DB
+echo "UPDATE denominations SET expire_withdraw=${OLD_WEXP} WHERE denominations_serial='${S_DENOM}';" | psql -Aqt $DB
}