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.keys.pubkeys().revocation_basepoint));
1602
-
let b_htlc_key = ignore_error!(chan_utils::derive_public_key(&self.secp_ctx, revocation_point,&self.keys.pubkeys().htlc_basepoint));
1603
1601
let htlc_privkey = ignore_error!(chan_utils::derive_private_key(&self.secp_ctx, revocation_point,&self.keys.htlc_base_key()));
1604
-
let a_htlc_key = ignore_error!(chan_utils::derive_public_key(&self.secp_ctx, revocation_point,&self.their_htlc_base_key));
1605
1602
let local_payment_key = ignore_error!(chan_utils::derive_private_key(&self.secp_ctx, revocation_point,&self.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
667
-
let sighash_parts = bip143::SighashComponents::new(&bumped_tx);
668
-
let sighash = hash_to_message!(&sighash_parts.sighash_all(&bumped_tx.input[i],&witness_script,*amount)[..]);
if htlc.transaction_output_index.unwrap() == outp.vout{
671
+
this_htlc = Some(htlc);
672
+
}
673
+
}
674
+
}
675
+
if this_htlc.is_none(){returnNone;}
676
+
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);
677
+
678
+
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
679
+
let sighash_parts = bip143::SighashComponents::new(&bumped_tx);
680
+
let sighash = hash_to_message!(&sighash_parts.sighash_all(&bumped_tx.input[i],&witness_script,*amount)[..]);
0 commit comments