mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
coin moves: persist the coin movement index counter to disk
Should make it easier to track when coin moves in the plugin are disjoint from what c-lightning says it's broadcast already.
This commit is contained in:
committed by
Rusty Russell
parent
44f747b29a
commit
ffd9467f14
@@ -70,6 +70,7 @@
|
||||
#include <lightningd/bitcoind.h>
|
||||
#include <lightningd/chaintopology.h>
|
||||
#include <lightningd/channel_control.h>
|
||||
#include <lightningd/coin_mvts.h>
|
||||
#include <lightningd/connect_control.h>
|
||||
#include <lightningd/invoice.h>
|
||||
#include <lightningd/io_loop_with_timers.h>
|
||||
@@ -825,6 +826,10 @@ int main(int argc, char *argv[])
|
||||
* states, invoices, payments, blocks and bitcoin transactions. */
|
||||
ld->wallet = wallet_new(ld, ld->timers);
|
||||
|
||||
/*~ We keep track of how many 'coin moves' we've ever made.
|
||||
* Initialize the starting value from the database here. */
|
||||
coin_mvts_init_count(ld);
|
||||
|
||||
/*~ We keep a filter of scriptpubkeys we're interested in. */
|
||||
ld->owned_txfilter = txfilter_new(ld);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user