diff options
author | Marcello Stanisci <stanisci.m@gmail.com> | 2019-09-04 15:01:31 +0200 |
---|---|---|
committer | Marcello Stanisci <stanisci.m@gmail.com> | 2019-09-04 15:01:31 +0200 |
commit | 1fc9595b2c66ac1b2af21c88f22d086defc8be57 (patch) | |
tree | 68494ff1e2934e13351a9d1705825089a8fff7be /src/wire-plugins/test_wire_plugin_transactions_taler-bank.c | |
parent | f4ffc4a27bd3724d83c8d205b35d6ea884fc3cfe (diff) | |
download | exchange-1fc9595b2c66ac1b2af21c88f22d086defc8be57.tar.xz |
Calling bank legacy API in a test
Diffstat (limited to 'src/wire-plugins/test_wire_plugin_transactions_taler-bank.c')
-rw-r--r-- | src/wire-plugins/test_wire_plugin_transactions_taler-bank.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/wire-plugins/test_wire_plugin_transactions_taler-bank.c b/src/wire-plugins/test_wire_plugin_transactions_taler-bank.c index 304890dcb..3d7fa76e0 100644 --- a/src/wire-plugins/test_wire_plugin_transactions_taler-bank.c +++ b/src/wire-plugins/test_wire_plugin_transactions_taler-bank.c @@ -79,6 +79,11 @@ static struct TALER_FAKEBANK_Handle *fb; static struct TALER_WIRE_HistoryHandle *hh; /** + * Handle to the history-range request (the "legacy" bank API). + */ +static struct TALER_WIRE_HistoryHandle *hhr; + +/** * Handle for the timeout task. */ static struct GNUNET_SCHEDULER_Task *tt; @@ -122,6 +127,14 @@ do_shutdown (void *cls) hh); hh = NULL; } + + if (NULL != hhr) + { + plugin->get_history_cancel (plugin->cls, + hhr); + hhr = NULL; + } + if (NULL != tt) { GNUNET_SCHEDULER_cancel (tt); @@ -256,10 +269,21 @@ confirmation_cb (void *cls, hh = plugin->get_history (plugin->cls, my_account, TALER_BANK_DIRECTION_BOTH, - NULL, 0, + NULL, + 0, 5, &history_result_cb, NULL); + + GNUNET_assert + (NULL != (hhr = plugin->get_history_range + (plugin->cls, + my_account, + TALER_BANK_DIRECTION_BOTH, + GNUNET_TIME_UNIT_ZERO_ABS, + GNUNET_TIME_UNIT_FOREVER_ABS, + &history_result_cb, + NULL))); } @@ -328,6 +352,7 @@ int main (int argc, const char *const argv[]) { + GNUNET_log_setup ("test-wire-plugin-transactions-test", "WARNING", NULL); |