diff --git a/src/auditor/test-sync.sh b/src/auditor/test-sync.sh index 24de92ebe..a69201a8a 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 821c2d9e1..118265b57 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 3673c7be1..821ebac86 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 a14c212d1..74b99cd4f 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 1ee401bc6..b9e5bc8f9 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 80cab782b..6e3008ad0 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;