Skip to content

Commit 14ace92

Browse files
committed
Fix SchnorrSig type references in PSBT serialization macros
1 parent 2b53000 commit 14ace92

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/util/psbt/map/input.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use util::psbt::raw;
2929
use util::psbt::serialize::Deserialize;
3030
use util::psbt::{Error, error};
3131

32-
use schnorr;
32+
use ::{SchnorrSig};
3333
use util::taproot::{ControlBlock, LeafVersion, TapLeafHash, TapBranchHash};
3434

3535
/// Type: Non-Witness UTXO PSBT_IN_NON_WITNESS_UTXO = 0x00
@@ -120,10 +120,10 @@ pub struct Input {
120120
#[cfg_attr(feature = "serde", serde(with = "::serde_utils::btreemap_byte_values"))]
121121
pub hash256_preimages: BTreeMap<sha256d::Hash, Vec<u8>>,
122122
/// Serialized schnorr signature with sighash type for key spend
123-
pub tap_key_sig: Option<schnorr::SchnorrSig>,
123+
pub tap_key_sig: Option<SchnorrSig>,
124124
/// Map of <xonlypubkey>|<leafhash> with signature
125125
#[cfg_attr(feature = "serde", serde(with = "::serde_utils::btreemap_as_seq"))]
126-
pub tap_script_sigs: BTreeMap<(XOnlyPublicKey, TapLeafHash), schnorr::SchnorrSig>,
126+
pub tap_script_sigs: BTreeMap<(XOnlyPublicKey, TapLeafHash), SchnorrSig>,
127127
/// Map of Control blocks to Script version pair
128128
#[cfg_attr(feature = "serde", serde(with = "::serde_utils::btreemap_as_seq"))]
129129
pub tap_scripts: BTreeMap<ControlBlock, (Script, LeafVersion)>,
@@ -209,12 +209,12 @@ impl Map for Input {
209209
}
210210
PSBT_IN_TAP_KEY_SIG => {
211211
impl_psbt_insert_pair! {
212-
self.tap_key_sig <= <raw_key: _>|<raw_value: schnorr::SchnorrSig>
212+
self.tap_key_sig <= <raw_key: _>|<raw_value: SchnorrSig>
213213
}
214214
}
215215
PSBT_IN_TAP_SCRIPT_SIG => {
216216
impl_psbt_insert_pair! {
217-
self.tap_script_sigs <= <raw_key: (XOnlyPublicKey, TapLeafHash)>|<raw_value: schnorr::SchnorrSig>
217+
self.tap_script_sigs <= <raw_key: (XOnlyPublicKey, TapLeafHash)>|<raw_value: SchnorrSig>
218218
}
219219
}
220220
PSBT_IN_TAP_LEAF_SCRIPT=> {
@@ -310,11 +310,11 @@ impl Map for Input {
310310
}
311311

312312
impl_psbt_get_pair! {
313-
rv.push(self.tap_key_sig as <PSBT_IN_TAP_KEY_SIG, _>|<Vec<u8>>)
313+
rv.push(self.tap_key_sig as <PSBT_IN_TAP_KEY_SIG, _>|<SchnorrSig>)
314314
}
315315

316316
impl_psbt_get_pair! {
317-
rv.push(self.tap_script_sigs as <PSBT_IN_TAP_SCRIPT_SIG, (XOnlyPublicKey, TapLeafHash)>|<Vec<u8>>)
317+
rv.push(self.tap_script_sigs as <PSBT_IN_TAP_SCRIPT_SIG, (XOnlyPublicKey, TapLeafHash)>|<SchnorrSig>)
318318
}
319319

320320
impl_psbt_get_pair! {

src/util/psbt/serialize.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020
2121
use prelude::*;
2222

23-
use ::{EcdsaSig, io};
23+
use io;
2424

2525
use blockdata::script::Script;
2626
use blockdata::transaction::{EcdsaSigHashType, Transaction, TxOut};
2727
use consensus::encode::{self, serialize, Decodable, Encodable, deserialize_partial};
2828
use secp256k1::{self, XOnlyPublicKey};
2929
use util::bip32::{ChildNumber, Fingerprint, KeySource};
3030
use hashes::{hash160, ripemd160, sha256, sha256d, Hash};
31-
use util::ecdsa::PublicKey;
31+
use util::ecdsa::{PublicKey, EcdsaSig};
3232
use util::psbt;
3333
use util::taproot::{TapBranchHash, TapLeafHash, ControlBlock, LeafVersion};
3434
use schnorr;

0 commit comments

Comments
 (0)