X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fsign%2Fecdsa.rs;h=2e98213c1825f2c0af8802bcc0838c2dc4d7af55;hb=b1ad95158e8cea0119df31fb5318a31fcc70e927;hp=194d714c977855e6058165ef4b1d4839f54ee2a2;hpb=6e5065d93d92bb678998e474f82408f372f90a52;p=rust-lightning diff --git a/lightning/src/sign/ecdsa.rs b/lightning/src/sign/ecdsa.rs index 194d714c..2e98213c 100644 --- a/lightning/src/sign/ecdsa.rs +++ b/lightning/src/sign/ecdsa.rs @@ -29,16 +29,18 @@ pub trait EcdsaChannelSigner: ChannelSigner { /// Policy checks should be implemented in this function, including checking the amount /// sent to us and checking the HTLCs. /// - /// The preimages of outgoing HTLCs that were fulfilled since the last commitment are provided. - /// A validating signer should ensure that an HTLC output is removed only when the matching - /// preimage is provided, or when the value to holder is restored. + /// The preimages of outbound and inbound HTLCs that were fulfilled since the last commitment + /// are provided. A validating signer should ensure that an outbound HTLC output is removed + /// only when the matching preimage is provided and after the corresponding inbound HTLC has + /// been removed for forwarded payments. /// /// Note that all the relevant preimages will be provided, but there may also be additional /// irrelevant or duplicate preimages. // // TODO: Document the things someone using this interface should enforce before signing. fn sign_counterparty_commitment(&self, commitment_tx: &CommitmentTransaction, - preimages: Vec, secp_ctx: &Secp256k1 + inbound_htlc_preimages: Vec, + outbound_htlc_preimages: Vec, secp_ctx: &Secp256k1, ) -> Result<(Signature, Vec), ()>; /// Creates a signature for a holder's commitment transaction. ///