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
Avoid unwrap'ing channel_parameters in to_counterparty signing
Previously, `StaticPaymentOutputDescriptor`s did not include
`channel_parameters` for the signer. As a result, when going to
spend old `StaticPaymentOutputDescriptor`s,
`InMemorySigner::sign_counterparty_payment_input` may be called
with `channel_parameters` set to `None`. This should be fine, but
in fa2a2ef we started relying on
it (indirectly via `channel_features`) for signing. This caused an
`unwrap` when spending old output descriptors.
This is fixed here by simply avoiding the unwrap and assuming old
`StaticPaymentOutputDescriptor`s represent non-anchor channels.
let sighash = hash_to_message!(&sighash::SighashCache::new(spend_tx).segwit_signature_hash(input_idx,&witness_script, descriptor.output.value,EcdsaSighashType::All).unwrap()[..]);
956
962
let remotesig = sign_with_aux_rand(secp_ctx,&sighash,&self.payment_key,&self);
957
-
let payment_script = ifself.channel_type_features().supports_anchors_zero_fee_htlc_tx(){
963
+
let payment_script = if supports_anchors_zero_fee_htlc_tx {
0 commit comments