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 witness_script = chan_utils::get_htlc_redeemscript_with_explicit_keys(&outp.htlc, onchain_handler.opt_anchors(),&chan_keys.broadcaster_htlc_key,&chan_keys.countersignatory_htlc_key,&chan_keys.revocation_key);
357
-
357
+
let sighashtype = if onchain_handler.opt_anchors(){SigHashType::SinglePlusAnyoneCanPay}else{SigHashType::All};
let witness_script = chan_utils::get_htlc_redeemscript_with_explicit_keys(&outp.htlc, onchain_handler.opt_anchors(),&chan_keys.broadcaster_htlc_key,&chan_keys.countersignatory_htlc_key,&chan_keys.revocation_key);
369
+
let sighashtype = if onchain_handler.opt_anchors(){SigHashType::SinglePlusAnyoneCanPay}else{SigHashType::All};
369
370
370
371
bumped_tx.lock_time = outp.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
let htlc_redeemscript = get_htlc_redeemscript_with_explicit_keys(&this_htlc,self.opt_anchors(),&keys.broadcaster_htlc_key,&keys.countersignatory_htlc_key,&keys.revocation_key);
1409
1409
1410
-
let sighash = hash_to_message!(&bip143::SigHashCache::new(&htlc_tx).signature_hash(0,&htlc_redeemscript, this_htlc.amount_msat / 1000,SigHashType::All)[..]);
1410
+
let sighashtype = ifself.opt_anchors(){SigHashType::SinglePlusAnyoneCanPay}else{SigHashType::All};
1411
+
let sighash = hash_to_message!(&bip143::SigHashCache::new(&htlc_tx).signature_hash(0,&htlc_redeemscript, this_htlc.amount_msat / 1000, sighashtype)[..]);
let htlc_redeemscript = get_htlc_redeemscript_with_explicit_keys(&this_htlc,self.opt_anchors(),&keys.broadcaster_htlc_key,&keys.countersignatory_htlc_key,&keys.revocation_key);
1431
1432
1433
+
let sighashtype = ifself.opt_anchors(){SigHashType::SinglePlusAnyoneCanPay}else{SigHashType::All};
1434
+
1432
1435
// First push the multisig dummy, note that due to BIP147 (NULLDUMMY) it must be a zero-length element.
0 commit comments