Introduce CommitmentTransaction, ChannelTransactionParameters
authorDevrandom <c1.devrandom@niftybox.net>
Thu, 15 Oct 2020 11:45:18 +0000 (13:45 +0200)
committerDevrandom <c1.devrandom@niftybox.net>
Wed, 30 Dec 2020 21:40:18 +0000 (13:40 -0800)
commit2de29ae04946801f0382cf85f15cbf90105ca4f8
tree71d14d621c9af528e42bf569f907426f7ee199f1
parenta294a3f9066f081570fd6dc9d6ba4ae02f3367fd
Introduce CommitmentTransaction, ChannelTransactionParameters

CommitmentTransaction maintains the per-commitment transaction fields needed to construct the associated bitcoin transactions (commitment, HTLC).  It replaces passing around of Bitcoin transactions.  The ChannelKeys API is modified accordingly.

By regenerating the transaction when implementing a validating external signer, this allows a higher level of assurance that all relevant aspects of the transactions were checked for policy violations.

ChannelTransactionParameters replaces passing around of individual per-channel fields that are needed to construct Bitcoin transactions.

Eliminate ChannelStaticData in favor of ChannelTransactionParameters.

Use counterparty txid instead of tx in channelmonitor update.
lightning/Cargo.toml
lightning/src/chain/channelmonitor.rs
lightning/src/chain/keysinterface.rs
lightning/src/ln/chan_utils.rs
lightning/src/ln/channel.rs
lightning/src/ln/functional_tests.rs
lightning/src/ln/onchaintx.rs
lightning/src/util/enforcing_trait_impls.rs
lightning/src/util/ser.rs