You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rename TxCreationKeys::new to not conflict w/ auto-gen'd C bindings
The C bindings automatically create a _new() function for structs
which contain only pub fields which we know how to map. This
conflicts with the actual TxCreationKeys::new() function, so we
simply rename it to capture its nature as a derivation function.
/// Gets the redeemscript for the funding transaction output (ie the funding transaction output
@@ -4709,7 +4709,7 @@ mod tests {
4709
4709
let per_commitment_secret = SecretKey::from_slice(&hex::decode("1f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100").unwrap()[..]).unwrap();
4710
4710
let per_commitment_point = PublicKey::from_secret_key(&secp_ctx,&per_commitment_secret);
4711
4711
let htlc_basepoint = &chan.local_keys.pubkeys().htlc_basepoint;
4712
-
let keys = TxCreationKeys::new(&secp_ctx,&per_commitment_point, delayed_payment_base, htlc_basepoint,&their_pubkeys.revocation_basepoint,&their_pubkeys.htlc_basepoint).unwrap();
4712
+
let keys = TxCreationKeys::derive_new(&secp_ctx,&per_commitment_point, delayed_payment_base, htlc_basepoint,&their_pubkeys.revocation_basepoint,&their_pubkeys.htlc_basepoint).unwrap();
let witness_script = chan_utils::get_htlc_redeemscript_with_explicit_keys(&htlc,&chan_keys.a_htlc_key,&chan_keys.b_htlc_key,&chan_keys.revocation_key);
612
612
613
613
if !preimage.is_some(){ bumped_tx.lock_time = htlc.cltv_expiry};// Right now we don't aggregate time-locked transaction, if we do we should set lock_time before to avoid breaking hash computation
0 commit comments