mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-04 06:44:24 +01:00
gossip: Only backfill blocks that are below our birth height
If we were to just insert filtered blocks in the range that we will scan later we'd be hitting the uniqueness constraints later. Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
committed by
Rusty Russell
parent
95d891ebf1
commit
379079c5f3
@@ -67,7 +67,9 @@ static void got_filteredblock(struct bitcoind *bitcoind,
|
||||
struct filteredblock_outpoint *fbo = NULL, *o;
|
||||
struct bitcoin_tx_output txo;
|
||||
|
||||
wallet_filteredblock_add(bitcoind->ld->wallet, fb);
|
||||
/* Only fill in blocks that we are not going to scan later. */
|
||||
if (bitcoind->ld->topology->min_blockheight > fb->height)
|
||||
wallet_filteredblock_add(bitcoind->ld->wallet, fb);
|
||||
|
||||
u32 outnum = short_channel_id_outnum(scid);
|
||||
u32 txindex = short_channel_id_txnum(scid);
|
||||
|
||||
Reference in New Issue
Block a user