]> git.bitcoin.ninja Git - rust-lightning/commit
Return Result<Signature> instead of modifying args in ChannelKeys
authorMatt Corallo <git@bluematt.me>
Sun, 19 Apr 2020 21:26:41 +0000 (17:26 -0400)
committerMatt Corallo <git@bluematt.me>
Sat, 25 Apr 2020 01:23:51 +0000 (21:23 -0400)
commitbf74bb625fb92f3a0345bee31fca97487e3aa6e7
tree67e90b456854c1a232c6c06b0d1a4fb6ba813eb4
parentddd85fb55023ac7fea1c1a7ae4748b2b795dff61
Return Result<Signature> instead of modifying args in ChannelKeys

This cleans up sign_local_commitment somewhat by returning a
Result<Signaure, ()> over the local commitment transaction instead
of modifying the struct which was passed in.

This is the first step in making LocalCommitmentTransaction a
completely pub struct, using it just to communicate enough
information to the user to allow them to construct a signaure
instead of having it contain a bunch of logic.

This should make it much easier to implement a custom ChannelKeys
by disconnecting the local commitment transaction signing from our
own datastructures.
lightning/src/chain/keysinterface.rs
lightning/src/ln/chan_utils.rs
lightning/src/ln/channel.rs
lightning/src/ln/channelmonitor.rs
lightning/src/ln/onchaintx.rs
lightning/src/util/enforcing_trait_impls.rs