Change ShutdownResult type to better capture the possibilites
authorMatt Corallo <git@bluematt.me>
Fri, 26 Feb 2021 02:55:30 +0000 (21:55 -0500)
committerMatt Corallo <git@bluematt.me>
Wed, 3 Mar 2021 01:40:29 +0000 (20:40 -0500)
commitba6eee24e4e07d5736f4612f6fe7262da0fff4df
tree4886d00af9b26228a17432c2cda6c263963f5ff2
parent280de80298f7ead8f474f474e524da7b92dce855
Change ShutdownResult type to better capture the possibilites

The return value from Channel::force_shutdown previously always
returned a `ChannelMonitorUpdate`, but expected it to only be
applied in the case that it *also* returned a Some for the funding
transaction output.

This is confusing, instead we move the `ChannelMontiorUpdate`
inside the Option, making it hold a tuple instead.
lightning/src/ln/channel.rs
lightning/src/ln/channelmanager.rs