Fix wirewatch.

Use negative delta (in /history requests) when the wirewatch
is run for the very first time against the exchange bank account.

This change was inspired by report #5649.
This commit is contained in:
Marcello Stanisci 2019-03-18 17:52:20 +01:00
parent 88f80b8b4b
commit 59075946de
No known key found for this signature in database
GPG Key ID: 8D526861953F4C0F

View File

@ -168,7 +168,7 @@ static int reset_mode;
/** /**
* How many transactions do we retrieve per batch? * How many transactions do we retrieve per batch?
*/ */
static unsigned int batch_size = 1024; static long long int batch_size = 1024;
/** /**
* How many transactions did we see in the current batch? * How many transactions did we see in the current batch?
@ -640,12 +640,13 @@ find_transfers (void *cls)
(0 != last_row_off_size) ) ); (0 != last_row_off_size) ) );
delay = GNUNET_YES; delay = GNUNET_YES;
current_batch_size = 0; current_batch_size = 0;
hh = wa_pos->wire_plugin->get_history (wa_pos->wire_plugin->cls, hh = wa_pos->wire_plugin->get_history (wa_pos->wire_plugin->cls,
wa_pos->section_name, wa_pos->section_name,
TALER_BANK_DIRECTION_CREDIT, TALER_BANK_DIRECTION_CREDIT,
last_row_off, last_row_off,
last_row_off_size, last_row_off_size,
batch_size, NULL != last_row_off ? batch_size : (-1) * batch_size,
&history_cb, &history_cb,
session); session);
if (NULL == hh) if (NULL == hh)