]> git.bitcoin.ninja Git - rust-lightning/commit
Generate shutdown script at channel close
authorJeffrey Czyz <jkczyz@gmail.com>
Mon, 26 Jul 2021 18:04:44 +0000 (14:04 -0400)
committerJeffrey Czyz <jkczyz@gmail.com>
Mon, 9 Aug 2021 20:55:28 +0000 (15:55 -0500)
commitecb0b842416dcf6fba0174ad5fcc173b3001825c
tree2c4ae39f01a844cdeec209e2d3a2ae5f806f4f08
parent1c449a39f4e6abf71e657f1f38827cc68a30e156
Generate shutdown script at channel close

When a shutdown script is omitted from open_channel or accept_channel,
it must be provided when sending shutdown. Generate the shutdown script
at channel closing time in this case rather at channel opening.

This requires producing a ChannelMonitorUpdate with the shutdown script
since it is no longer known at ChannelMonitor creation.
lightning/src/chain/channelmonitor.rs
lightning/src/ln/chanmon_update_fail_tests.rs
lightning/src/ln/channel.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/functional_tests.rs
lightning/src/util/test_utils.rs