diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-02-05 20:13:40 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-02-05 20:13:40 +0100 |
commit | 64b2bc455845022001dd26923df0477eebdf3a86 (patch) | |
tree | e4936afbe7481a4fd58f5b9f39c08bdafeeeda2f /src/exchangedb/test_exchangedb.c | |
parent | ab03ba16e9bc63eb5384e7b6b590fc029bf61152 (diff) | |
download | exchange-64b2bc455845022001dd26923df0477eebdf3a86.tar.gz exchange-64b2bc455845022001dd26923df0477eebdf3a86.tar.bz2 exchange-64b2bc455845022001dd26923df0477eebdf3a86.zip |
-fix FTBFS of exchange test
Diffstat (limited to 'src/exchangedb/test_exchangedb.c')
-rw-r--r-- | src/exchangedb/test_exchangedb.c | 55 |
1 files changed, 39 insertions, 16 deletions
diff --git a/src/exchangedb/test_exchangedb.c b/src/exchangedb/test_exchangedb.c index 68f94b6ea..0bb35df1a 100644 --- a/src/exchangedb/test_exchangedb.c +++ b/src/exchangedb/test_exchangedb.c @@ -1289,15 +1289,26 @@ run (void *cls) &amount_with_fee)); result = 4; now = GNUNET_TIME_timestamp_get (); - FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != - plugin->reserves_in_insert (plugin->cls, - &reserve_pub, - &value, - now, - sndr, - "exchange-account-1", - 4)); + { + struct TALER_EXCHANGEDB_ReserveInInfo reserve = { + .reserve_pub = &reserve_pub, + .balance = &value, + .execution_time = now, + .sender_account_details = sndr, + .exchange_account_name = "exchange-account-1", + .wire_reference = 4 + }; + enum GNUNET_DB_QueryStatus qsr; + FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != + plugin->reserves_in_insert (plugin->cls, + &reserve, + 1, + 1, + &qsr)); + FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != + qsr); + } FAILIF (GNUNET_OK != check_reserve (&reserve_pub, value.value, @@ -1305,14 +1316,26 @@ run (void *cls) value.currency)); now = GNUNET_TIME_timestamp_get (); RND_BLK (&reserve_pub2); - FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != - plugin->reserves_in_insert (plugin->cls, - &reserve_pub2, - &value, - now, - sndr, - "exchange-account-1", - 5)); + { + struct TALER_EXCHANGEDB_ReserveInInfo reserve = { + .reserve_pub = &reserve_pub2, + .balance = &value, + .execution_time = now, + .sender_account_details = sndr, + .exchange_account_name = "exchange-account-1", + .wire_reference = 5 + }; + enum GNUNET_DB_QueryStatus qsr; + + FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != + plugin->reserves_in_insert (plugin->cls, + &reserve, + 1, + 1, + &qsr)); + FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != + qsr); + } FAILIF (GNUNET_OK != check_reserve (&reserve_pub, value.value, |