diff --git a/lightningd/peer_control.c b/lightningd/peer_control.c index ebcfcf4ed..7adec90f3 100644 --- a/lightningd/peer_control.c +++ b/lightningd/peer_control.c @@ -1210,7 +1210,7 @@ static bool check_funding_tx(const struct bitcoin_tx *tx, static void update_channel_from_inflight(struct lightningd *ld, struct channel *channel, - struct channel_inflight *inflight) + const struct channel_inflight *inflight) { struct wally_psbt *psbt_copy; @@ -1223,7 +1223,7 @@ static void update_channel_from_inflight(struct lightningd *ld, channel->push = inflight->lease_fee; tal_free(channel->lease_commit_sig); channel->lease_commit_sig - = tal_steal(channel, inflight->lease_commit_sig); + = tal_dup_or_null(channel, secp256k1_ecdsa_signature, inflight->lease_commit_sig); channel->lease_chan_max_msat = inflight->lease_chan_max_msat; channel->lease_chan_max_ppt = inflight->lease_chan_max_ppt; diff --git a/tests/test_closing.py b/tests/test_closing.py index 481ac860a..61264648b 100644 --- a/tests/test_closing.py +++ b/tests/test_closing.py @@ -814,7 +814,7 @@ def test_channel_lease_falls_behind(node_factory, bitcoind): compact_lease=rates['compact_lease']) # sink the funding transaction - bitcoind.generate_block(1) + bitcoind.generate_block(1, wait_for_mempool=1) # stop l1 l1.stop()