mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
lightningd: fire watches on blocks before telling lightningd.
We noticed bogus behavior where (with 200 blocks added at once) lightningd didn't see a DF channel open: this is because we told lightningd about the new blocks (and it timed out channel) before the watches for the transaction are fired. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
36e5156832
commit
6753675c31
@ -619,12 +619,12 @@ void topology_add_sync_waiter_(const tal_t *ctx,
|
||||
static void updates_complete(struct chain_topology *topo)
|
||||
{
|
||||
if (!bitcoin_blkid_eq(&topo->tip->blkid, &topo->prev_tip)) {
|
||||
/* Tell lightningd about new block. */
|
||||
notify_new_block(topo->bitcoind->ld, topo->tip->height);
|
||||
|
||||
/* Tell watch code to re-evaluate all txs. */
|
||||
watch_topology_changed(topo);
|
||||
|
||||
/* Tell lightningd about new block. */
|
||||
notify_new_block(topo->bitcoind->ld, topo->tip->height);
|
||||
|
||||
/* Maybe need to rebroadcast. */
|
||||
rebroadcast_txs(topo, NULL);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user