mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 01:43:36 +01:00
lightningd: fix assertion when funding depth changes fast.
We didn't apply the inflight to the channel struct before asserting, so we can break test_rbf_non_last_mined: ``` lightningd: lightningd/dual_open_control.c:981: dualopend_tell_depth: Assertion `bitcoin_txid_eq(&channel->funding.txid, txid)' failed. ``` Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
9561094433
commit
0b680c5f40
@ -1041,11 +1041,11 @@ static enum watch_result opening_depth_cb(struct lightningd *ld,
|
||||
wallet_channel_save(ld->wallet, inflight->channel);
|
||||
}
|
||||
|
||||
dualopend_tell_depth(inflight->channel, txid, depth);
|
||||
|
||||
if (depth >= inflight->channel->minimum_depth)
|
||||
update_channel_from_inflight(ld, inflight->channel, inflight);
|
||||
|
||||
dualopend_tell_depth(inflight->channel, txid, depth);
|
||||
|
||||
return KEEP_WATCHING;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user