aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-05-08 14:35:48 +0200
committerChristian Grothoff <christian@grothoff.org>2017-05-08 14:35:48 +0200
commitb53c189e0a0d53df325cb9abeaaa515fa3414c18 (patch)
tree87de7f58a994545ded4882a5e26e5bbc09a83d39
parent8f854fb04c02f2e10ab41be3140bdf9aa05e0a83 (diff)
nominally finish implementation of taler-exchange-wirewatch (still needs testing)
-rw-r--r--src/exchange/taler-exchange-wirewatch.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/exchange/taler-exchange-wirewatch.c b/src/exchange/taler-exchange-wirewatch.c
index 6daf5caca..195aa47d9 100644
--- a/src/exchange/taler-exchange-wirewatch.c
+++ b/src/exchange/taler-exchange-wirewatch.c
@@ -219,8 +219,6 @@ history_cb (void *cls,
{
hh = NULL;
- /* FIXME: commit last_off to DB!?
- (or just select via 'reserves_in' by SERIAL ID!?) */
ret = db_plugin->commit (db_plugin->cls,
session);
if (GNUNET_OK == ret)
@@ -278,6 +276,7 @@ static void
find_transfers (void *cls)
{
struct TALER_EXCHANGEDB_Session *session;
+ int ret;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Checking for incoming wire transfers\n");
@@ -300,8 +299,18 @@ find_transfers (void *cls)
GNUNET_SCHEDULER_shutdown ();
return;
}
- /* FIXME: fetch start_off from DB! */
-
+ ret = db_plugin->get_latest_reserve_in_reference (db_plugin->cls,
+ session,
+ &start_off,
+ &start_off_size);
+ if (GNUNET_SYSERR == ret)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Failed to obtain starting point for montoring from database!\n");
+ global_ret = GNUNET_SYSERR;
+ GNUNET_SCHEDULER_shutdown ();
+ return;
+ }
delay = GNUNET_YES;
hh = wire_plugin->get_history (wire_plugin->cls,
TALER_BANK_DIRECTION_CREDIT,