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
let revocation_pubkey = ignore_error!(chan_utils::derive_public_revocation_key(&self.secp_ctx, revocation_point,&self.onchain_detection.keys.pubkeys().revocation_basepoint));
1596
-
let b_htlc_key = ignore_error!(chan_utils::derive_public_key(&self.secp_ctx, revocation_point,&self.onchain_detection.keys.pubkeys().htlc_basepoint));
1597
1595
let htlc_privkey = ignore_error!(chan_utils::derive_private_key(&self.secp_ctx, revocation_point,&self.onchain_detection.keys.htlc_base_key()));
let local_payment_key = ignore_error!(chan_utils::derive_private_key(&self.secp_ctx, revocation_point,&self.onchain_detection.keys.payment_base_key()));
if !preimage.is_some(){ bumped_tx.lock_time = *locktime };// Right now we don't aggregate time-locked transaction, if we do we should set lock_time before to avoid breaking hash computation
698
-
let sighash_parts = bip143::SighashComponents::new(&bumped_tx);
699
-
let sighash = hash_to_message!(&sighash_parts.sighash_all(&bumped_tx.input[i],&witness_script,*amount)[..]);
if htlc.transaction_output_index.unwrap() == outp.vout{
702
+
this_htlc = Some(htlc);
703
+
}
704
+
}
705
+
}
706
+
if this_htlc.is_none(){returnNone;}
707
+
let witness_script = chan_utils::get_htlc_redeemscript_with_explicit_keys(&this_htlc.unwrap(),&chan_keys.a_htlc_key,&chan_keys.b_htlc_key,&chan_keys.revocation_key);
708
+
709
+
if !preimage.is_some(){ bumped_tx.lock_time = *locktime };// Right now we don't aggregate time-locked transaction, if we do we should set lock_time before to avoid breaking hash computation
710
+
let sighash_parts = bip143::SighashComponents::new(&bumped_tx);
711
+
let sighash = hash_to_message!(&sighash_parts.sighash_all(&bumped_tx.input[i],&witness_script,*amount)[..]);
0 commit comments