diff --git a/src/blockdata/script.rs b/src/blockdata/script.rs index 5a62cab0..4a946747 100644 --- a/src/blockdata/script.rs +++ b/src/blockdata/script.rs @@ -1038,10 +1038,10 @@ mod test { let pubkey = PublicKey::from_str("0234e6a79c5359c613762d537e0e19d86c77c1666d8c9ab050f23acd198e97f93e").unwrap(); assert!(Script::new_p2pk(&pubkey).is_p2pk()); - let pubkey_hash = PubkeyHash::hash(&pubkey.serialize()); + let pubkey_hash = PubkeyHash::hash(&pubkey.key.serialize()); assert!(Script::new_p2pkh(&pubkey_hash).is_p2pkh()); - let wpubkey_hash = WPubkeyHash::hash(&pubkey.serialize()); + let wpubkey_hash = WPubkeyHash::hash(&pubkey.key.serialize()); assert!(Script::new_v0_wpkh(&wpubkey_hash).is_v0_p2wpkh()); let script = Builder::new().push_opcode(opcodes::all::OP_NUMEQUAL) diff --git a/src/util/psbt/map/input.rs b/src/util/psbt/map/input.rs index 926bf899..52ef22ab 100644 --- a/src/util/psbt/map/input.rs +++ b/src/util/psbt/map/input.rs @@ -16,13 +16,13 @@ use prelude::*; use ::{EcdsaSig, io}; +use secp256k1; use blockdata::script::Script; use blockdata::transaction::{EcdsaSigHashType, Transaction, TxOut}; use consensus::encode; +use hashes::{self, hash160, ripemd160, sha256, sha256d}; use secp256k1::XOnlyPublicKey; use util::bip32::KeySource; -use hashes::{self, hash160, ripemd160, sha256, sha256d}; -use util::ecdsa::PublicKey; use util::psbt; use util::psbt::map::Map; use util::psbt::raw; @@ -88,7 +88,7 @@ pub struct Input { pub witness_utxo: Option, /// A map from public keys to their corresponding signature as would be /// pushed to the stack from a scriptSig or witness for a non-taproot inputs. - pub partial_sigs: BTreeMap, + pub partial_sigs: BTreeMap, /// The sighash type to be used for this input. Signatures for this input /// must use the sighash type. pub sighash_type: Option, @@ -99,7 +99,7 @@ pub struct Input { /// A map from public keys needed to sign this input to their corresponding /// master key fingerprints and derivation paths. #[cfg_attr(feature = "serde", serde(with = "::serde_utils::btreemap_as_seq"))] - pub bip32_derivation: BTreeMap, + pub bip32_derivation: BTreeMap, /// The finalized, fully-constructed scriptSig with signatures and any other /// scripts necessary for this input to pass validation. pub final_script_sig: Option