Fold sign_holder_commitment_htlc_transactions into sign_holder_commitment
[rust-lightning] / lightning / src / ln / channel.rs
index 4ba8b28bfd5780a49ec0e9260ee4f4da0b81b990..08faea160bb193a0d652a03211d4d2039942f500 100644 (file)
@@ -4742,15 +4742,13 @@ mod tests {
                                        &chan.holder_keys.pubkeys().funding_pubkey,
                                        chan.counterparty_funding_pubkey()
                                );
-                               let holder_sig = chan_keys.sign_holder_commitment(&holder_commitment_tx, &secp_ctx).unwrap();
+                               let (holder_sig, htlc_sigs) = chan_keys.sign_holder_commitment_and_htlcs(&holder_commitment_tx, &secp_ctx).unwrap();
                                assert_eq!(Signature::from_der(&hex::decode($sig_hex).unwrap()[..]).unwrap(), holder_sig, "holder_sig");
 
                                let funding_redeemscript = chan.get_funding_redeemscript();
                                let tx = holder_commitment_tx.add_holder_sig(&funding_redeemscript, holder_sig);
                                assert_eq!(serialize(&tx)[..], hex::decode($tx_hex).unwrap()[..], "tx");
 
-                               let htlc_sigs = chan_keys.sign_holder_commitment_htlc_transactions(&holder_commitment_tx, &secp_ctx).unwrap();
-
                                // ((htlc, counterparty_sig), (index, holder_sig))
                                let mut htlc_sig_iter = holder_commitment_tx.htlcs().iter().zip(&holder_commitment_tx.counterparty_htlc_sigs).zip(htlc_sigs.iter().enumerate());