add -r command line option to wirewatch
This commit is contained in:
parent
749c02fe37
commit
0b9ffa874f
@ -22,6 +22,9 @@ Print short help on options.
|
||||
.IP "\-T, \-\-test"
|
||||
Run in test mode and exit when idle.
|
||||
.B
|
||||
.IP "\-r, \-\-reset"
|
||||
Ignore our own database and start with transactions from the beginning of time.
|
||||
.B
|
||||
.IP "\-v, \-\-version"
|
||||
Print version information.
|
||||
.B
|
||||
|
@ -116,6 +116,11 @@ static int delay;
|
||||
*/
|
||||
static int test_mode;
|
||||
|
||||
/**
|
||||
* Are we running from scratch and should re-process all transactions?
|
||||
*/
|
||||
static int reset_mode;
|
||||
|
||||
/**
|
||||
* Next task to run, if any.
|
||||
*/
|
||||
@ -443,6 +448,8 @@ find_transfers (void *cls)
|
||||
GNUNET_SCHEDULER_shutdown ();
|
||||
return;
|
||||
}
|
||||
if (! reset_mode)
|
||||
{
|
||||
qs = db_plugin->get_latest_reserve_in_reference (db_plugin->cls,
|
||||
session,
|
||||
&start_off,
|
||||
@ -464,6 +471,7 @@ find_transfers (void *cls)
|
||||
NULL);
|
||||
return;
|
||||
}
|
||||
}
|
||||
delay = GNUNET_YES;
|
||||
hh = wire_plugin->get_history (wire_plugin->cls,
|
||||
TALER_BANK_DIRECTION_CREDIT,
|
||||
@ -535,6 +543,10 @@ main (int argc,
|
||||
"test",
|
||||
"run in test mode and exit when idle",
|
||||
&test_mode),
|
||||
GNUNET_GETOPT_option_flag ('r',
|
||||
"reset",
|
||||
"start fresh with all transactions in the history",
|
||||
&reset_mode),
|
||||
GNUNET_GETOPT_OPTION_END
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user