gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] 01/02: -work on test_sync.sh, incomplete


From: gnunet
Subject: [taler-exchange] 01/02: -work on test_sync.sh, incomplete
Date: Mon, 28 Feb 2022 22:41:28 +0100

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

grothoff pushed a commit to branch master
in repository exchange.

commit ee79f312754304d15704e122970223f28759fceb
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon Feb 28 21:02:12 2022 +0100

    -work on test_sync.sh, incomplete
---
 src/auditor/test-sync.sh                    |  3 ++-
 src/exchangedb/exchange-0001.sql            |  1 +
 src/exchangedb/irbt_callbacks.c             |  4 ++++
 src/exchangedb/lrbt_callbacks.c             |  4 ++--
 src/exchangedb/plugin_exchangedb_postgres.c | 12 +++++++-----
 src/include/taler_exchangedb_plugin.h       |  2 +-
 6 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/src/auditor/test-sync.sh b/src/auditor/test-sync.sh
index 24de92eb..a69201a8 100755
--- a/src/auditor/test-sync.sh
+++ b/src/auditor/test-sync.sh
@@ -18,7 +18,8 @@ psql talercheck-in < auditor-basedb.sql >/dev/null 2> 
/dev/null
 echo -n "."
 taler-auditor-sync -s test-sync-in.conf -d test-sync-out.conf -t
 
-for table in denominations denomination_revocations reserves reserves_in 
reserves_close reserves_out auditors auditor_denom_sigs exchange_sign_keys 
signkey_revocations known_coins refresh_commitments refresh_revealed_coins 
refresh_transfer_keys deposits refunds wire_out aggregation_tracking wire_fee 
recoup recoup_refresh
+# cs_nonce_locks excluded: no point
+for table in denominations denomination_revocations wire_targets reserves 
reserves_in reserves_close reserves_out auditors auditor_denom_sigs 
exchange_sign_keys signkey_revocations extensions extension_details known_coins 
refresh_commitments refresh_revealed_coins refresh_transfer_keys deposits 
refunds wire_out aggregation_tracking wire_fee recoup recoup_refresh
 do
     echo -n "."
     CIN=`echo "SELECT COUNT(*) FROM $table" | psql talercheck-in -Aqt`
diff --git a/src/exchangedb/exchange-0001.sql b/src/exchangedb/exchange-0001.sql
index 821c2d9e..118265b5 100644
--- a/src/exchangedb/exchange-0001.sql
+++ b/src/exchangedb/exchange-0001.sql
@@ -2079,6 +2079,7 @@ UPDATE known_coins
   WHERE coin_pub=in_coin_pub;
 
 
+
 -- Credit the reserve and update reserve timers.
 UPDATE reserves
   SET
diff --git a/src/exchangedb/irbt_callbacks.c b/src/exchangedb/irbt_callbacks.c
index 3673c7be..821ebac8 100644
--- a/src/exchangedb/irbt_callbacks.c
+++ b/src/exchangedb/irbt_callbacks.c
@@ -39,6 +39,10 @@ irbt_cb_table_denominations (struct PostgresClosure *pg,
   struct GNUNET_PQ_QueryParam params[] = {
     GNUNET_PQ_query_param_uint64 (&td->serial),
     GNUNET_PQ_query_param_auto_from_type (&denom_hash),
+    GNUNET_PQ_query_param_uint32 (
+      &td->details.denominations.denom_type),
+    GNUNET_PQ_query_param_uint32 (
+      &td->details.denominations.age_mask),
     TALER_PQ_query_param_denom_pub (
       &td->details.denominations.denom_pub),
     GNUNET_PQ_query_param_auto_from_type (
diff --git a/src/exchangedb/lrbt_callbacks.c b/src/exchangedb/lrbt_callbacks.c
index a14c212d..74b99cd4 100644
--- a/src/exchangedb/lrbt_callbacks.c
+++ b/src/exchangedb/lrbt_callbacks.c
@@ -53,8 +53,8 @@ lrbt_cb_table_denominations (void *cls,
         "denom_type",
         &td.details.denominations.denom_type),
       GNUNET_PQ_result_spec_uint32 (
-        "age_restrictions",
-        &td.details.denominations.age_restrictions),
+        "age_mask",
+        &td.details.denominations.age_mask),
       TALER_PQ_result_spec_denom_pub (
         "denom_pub",
         &td.details.denominations.denom_pub),
diff --git a/src/exchangedb/plugin_exchangedb_postgres.c 
b/src/exchangedb/plugin_exchangedb_postgres.c
index 1ee401bc..b9e5bc8f 100644
--- a/src/exchangedb/plugin_exchangedb_postgres.c
+++ b/src/exchangedb/plugin_exchangedb_postgres.c
@@ -280,8 +280,9 @@ prepare_statements (struct PostgresClosure *pg)
       ",fee_refresh_frac"
       ",fee_refund_val"
       ",fee_refund_frac"
-      ",denom_pub"
+      ",denom_type"
       ",age_mask"
+      ",denom_pub"
       " FROM denominations"
       " LEFT JOIN "
       "   denomination_revocations USING (denominations_serial);",
@@ -2162,7 +2163,7 @@ prepare_statements (struct PostgresClosure *pg)
       ",h_blind_ev"
       ",denominations_serial"
       ",denom_sig"
-      ",reserve_pub"
+      ",reserve_uuid"
       ",reserve_sig"
       ",execution_date"
       ",amount_with_fee_val"
@@ -2384,6 +2385,8 @@ prepare_statements (struct PostgresClosure *pg)
       "INSERT INTO denominations"
       "(denominations_serial"
       ",denom_pub_hash"
+      ",denom_type"
+      ",age_mask"
       ",denom_pub"
       ",master_sig"
       ",valid_from"
@@ -2400,11 +2403,10 @@ prepare_statements (struct PostgresClosure *pg)
       ",fee_refresh_frac"
       ",fee_refund_val"
       ",fee_refund_frac"
-      ",age_mask"
       ") VALUES "
       "($1, $2, $3, $4, $5, $6, $7, $8, $9, $10,"
-      " $11, $12, $13, $14, $15, $16, $17, $18, $19);",
-      19),
+      " $11, $12, $13, $14, $15, $16, $17, $18, $19, $20);",
+      20),
     GNUNET_PQ_make_prepare (
       "insert_into_table_denomination_revocations",
       "INSERT INTO denomination_revocations"
diff --git a/src/include/taler_exchangedb_plugin.h 
b/src/include/taler_exchangedb_plugin.h
index 80cab782..6e3008ad 100644
--- a/src/include/taler_exchangedb_plugin.h
+++ b/src/include/taler_exchangedb_plugin.h
@@ -200,7 +200,7 @@ struct TALER_EXCHANGEDB_TableData
     struct
     {
       uint32_t denom_type;
-      uint32_t age_restrictions;
+      uint32_t age_mask;
       struct TALER_DenominationPublicKey denom_pub;
       struct TALER_MasterSignatureP master_sig;
       struct GNUNET_TIME_Timestamp valid_from;

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