From 3b90e437e26013f5570d6c216b832c7bcd740712 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 15 Aug 2021 19:01:17 +0200 Subject: add logic to resume wire transfer checks from last checkpoint --- .../anastasis-helper-authorization-iban.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/authorization') diff --git a/src/authorization/anastasis-helper-authorization-iban.c b/src/authorization/anastasis-helper-authorization-iban.c index b66d181..946b008 100644 --- a/src/authorization/anastasis-helper-authorization-iban.c +++ b/src/authorization/anastasis-helper-authorization-iban.c @@ -22,7 +22,6 @@ * - blocked on #6992 * - needs XXX_bank_service to access new facade once #6992 is implemented * - needs to load authentication information - * - needs to load 'last known' transaction from DB * - needs to add DB triggers to notify main service of inbound activity */ #include "platform.h" @@ -45,6 +44,11 @@ */ static struct BANK_AccountInfo *auth; +/** + * Bank account payto://-URI this process is monitoring. + */ +static struct credit_account_uri; + /** * Active request for history. */ @@ -282,7 +286,20 @@ run (void *cls, return; } // FIXME: initialize 'auth' from cfg! + { + enum GNUNET_DB_QueryStatus qs; + qs = db_plugin->get_last_auth_iban_payment_row (db_plugin->cls, + credit_account_uri, + &latest_row_off); + if (qs < 0) + { + GNUNET_break (0); + ANASTASIS_DB_plugin_unload (db_plugin); + db_plugin = NULL; + return; + } + } GNUNET_SCHEDULER_add_shutdown (&shutdown_task, cls); ctx = GNUNET_CURL_init (&GNUNET_CURL_gnunet_scheduler_reschedule, -- cgit v1.2.3