aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-09-14 19:48:26 +0200
committerChristian Grothoff <christian@grothoff.org>2023-09-14 19:48:26 +0200
commitc573ebd2fd16c113e175e699d3761d8f7ad9322e (patch)
treedfa6e4ca3d555f25fbcb0dcc08ea481bf9368595
parent6e5092d83473dc1b0200d82744cf0f0056b0c110 (diff)
get test_auditor to pass
-rw-r--r--src/auditordb/auditor-0001.sql2
-rw-r--r--src/exchangedb/exchange_do_select_deposits_missing_wire.sql3
-rw-r--r--src/exchangedb/pg_select_batch_deposits_missing_wire.c4
3 files changed, 5 insertions, 4 deletions
diff --git a/src/auditordb/auditor-0001.sql b/src/auditordb/auditor-0001.sql
index 2fe322b1f..a167e8555 100644
--- a/src/auditordb/auditor-0001.sql
+++ b/src/auditordb/auditor-0001.sql
@@ -313,7 +313,7 @@ COMMENT ON TABLE auditor_predicted_result
CREATE TABLE IF NOT EXISTS auditor_pending_deposits
(master_pub BYTEA NOT NULL CONSTRAINT master_pub_ref REFERENCES auditor_exchanges(master_pub) ON DELETE CASCADE
,total_amount taler_amount NOT NULL
- ,wire_target_h_payto BYTEA CHECK (LENGTH(wire_target_h_payto)=64)
+ ,wire_target_h_payto BYTEA CHECK (LENGTH(wire_target_h_payto)=32)
,batch_deposit_serial_id INT8 NOT NULL
,deadline INT8 NOT NULL
,PRIMARY KEY(master_pub, batch_deposit_serial_id)
diff --git a/src/exchangedb/exchange_do_select_deposits_missing_wire.sql b/src/exchangedb/exchange_do_select_deposits_missing_wire.sql
index 40ebd8b88..3d44a58c9 100644
--- a/src/exchangedb/exchange_do_select_deposits_missing_wire.sql
+++ b/src/exchangedb/exchange_do_select_deposits_missing_wire.sql
@@ -28,7 +28,8 @@ DECLARE
,wire_target_h_payto
,wire_deadline
FROM batch_deposits
- WHERE batch_deposit_serial_id > in_min_serial_id;
+ WHERE batch_deposit_serial_id > in_min_serial_id
+ ORDER BY batch_deposit_serial_id ASC;
DECLARE
my_total_val INT8; -- all deposits without wire
DECLARE
diff --git a/src/exchangedb/pg_select_batch_deposits_missing_wire.c b/src/exchangedb/pg_select_batch_deposits_missing_wire.c
index 1ab0a4b3b..8f966326a 100644
--- a/src/exchangedb/pg_select_batch_deposits_missing_wire.c
+++ b/src/exchangedb/pg_select_batch_deposits_missing_wire.c
@@ -67,7 +67,7 @@ missing_wire_cb (void *cls,
struct MissingWireContext *mwc = cls;
struct PostgresClosure *pg = mwc->pg;
- while (0 < num_results)
+ for (unsigned int i = 0; i<num_results; i++)
{
uint64_t batch_deposit_serial_id;
struct GNUNET_TIME_Timestamp deadline;
@@ -88,7 +88,7 @@ missing_wire_cb (void *cls,
if (GNUNET_OK !=
GNUNET_PQ_extract_result (result,
rs,
- --num_results))
+ i))
{
GNUNET_break (0);
mwc->status = GNUNET_SYSERR;