]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Fix bitcoin type compliance for network/signature stuff.
authorArik Sosman <git@arik.io>
Tue, 6 Aug 2024 18:53:32 +0000 (11:53 -0700)
committerArik Sosman <git@arik.io>
Tue, 6 Aug 2024 18:53:32 +0000 (11:53 -0700)
lightning/src/ln/chan_utils.rs
lightning/src/offers/invoice.rs

index c3aa3e17ee37a56f4284710e5104b7d5479474fe..37398e2231b35532be2af7ce3d82fb431a29e625 100644 (file)
@@ -736,7 +736,7 @@ pub fn build_htlc_input_witness(
        let mut witness = Witness::new();
        // First push the multisig dummy, note that due to BIP147 (NULLDUMMY) it must be a zero-length element.
        witness.push(vec![]);
-       witness.push_ecdsa_signature(&BitcoinSignature { sig: *remote_sig, hash_ty: remote_sighash_type });
+       witness.push_ecdsa_signature(&BitcoinSignature { signature: *remote_sig, sighash_type: remote_sighash_type });
        witness.push_ecdsa_signature(&BitcoinSignature::sighash_all(*local_sig));
        if let Some(preimage) = preimage {
                witness.push(preimage.0.to_vec());
index c4f4e4a43e046d8f1f4b524c22371f91508e2b07..6077043b42c6e22caad291f5d4a1bdc83b466a21 100644 (file)
@@ -1079,7 +1079,7 @@ pub(super) fn filter_fallbacks(
                        Ok(witness_program) => witness_program,
                        Err(_) => return None,
                };
-               Some(Address::from_witness_program(witness_program, network.into()))
+               Some(Address::from_witness_program(witness_program, network))
        };
 
        fallbacks.iter().filter_map(to_valid_address).collect()