wallet: store last block number we searched for UTXOs.

We already go back 100 from this in case of reorgs, so the block number
itself is sufficient.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2018-02-16 08:39:53 +10:30 committed by Christian Decker
parent 256bdc12ff
commit 21849329dd

View File

@ -348,6 +348,10 @@ static void updates_complete(struct chain_topology *topo)
/* Maybe need to rebroadcast. */
rebroadcast_txs(topo, NULL);
/* We've processed these UTXOs */
db_set_intvar(topo->bitcoind->ld->wallet->db,
"last_processed_block", topo->tip->height);
topo->prev_tip = topo->tip;
}