]> git.bitcoin.ninja Git - rust-lightning/commit
Add an infallible no-sign version of send_commitment_no_status_check
authorMatt Corallo <git@bluematt.me>
Thu, 1 Dec 2022 00:25:32 +0000 (00:25 +0000)
committerMatt Corallo <git@bluematt.me>
Fri, 17 Feb 2023 19:09:28 +0000 (19:09 +0000)
commit8aa518f23d48a6749e23c590700648ea01f6a4df
treeb482df529fa2f55b1899b721224e669635081f81
parent5be29c6add4cb37619a506caea2296d9472028c1
Add an infallible no-sign version of send_commitment_no_status_check

In the coming commits we'll move to async `ChannelMonitorUpdate`
application, which means we'll want to generate a
`ChannelMonitorUpdate` (including a new counterparty commitment
transaction) before we actually send it to our counterparty. To do
that today we'd have to actually sign the commitment transaction
by calling the signer, then drop it, apply the
`ChannelMonitorUpdate`, then re-sign the commitment transaction to
send it to our peer.

In this commit we instead split `send_commitment_no_status_check`
and `send_commitment_no_state_update` into `build_` and `send_`
variants, allowing us to generate new counterparty commitment
transactions without actually signing, then build them for sending,
with signatures, later.
lightning/src/ln/channel.rs