Refactor imports
Clean up some imports, only do the ones that we are about to touch. - Remove/add whitespace to group by crate - move modules/types to their module instead of using lib wide re-export (this helps minimise future merge conflicts) Re-order imports, refactor only. No logic changes.
This commit is contained in:
parent
29f21d6ff5
commit
7c040f4437
|
@ -9,15 +9,16 @@
|
||||||
//! signatures, which are placed in the scriptSig.
|
//! signatures, which are placed in the scriptSig.
|
||||||
//!
|
//!
|
||||||
|
|
||||||
|
use core::ops::{Deref, DerefMut};
|
||||||
|
|
||||||
|
use crate::io;
|
||||||
|
|
||||||
use crate::hashes::Hash;
|
use crate::hashes::Hash;
|
||||||
use crate::hash_types::Sighash;
|
use crate::hash_types::Sighash;
|
||||||
use crate::blockdata::script::Script;
|
use crate::blockdata::script::Script;
|
||||||
use crate::blockdata::witness::Witness;
|
|
||||||
use crate::blockdata::transaction::{Transaction, EcdsaSighashType};
|
use crate::blockdata::transaction::{Transaction, EcdsaSighashType};
|
||||||
|
use crate::blockdata::witness::Witness;
|
||||||
use crate::consensus::encode;
|
use crate::consensus::encode;
|
||||||
|
|
||||||
use crate::io;
|
|
||||||
use core::ops::{Deref, DerefMut};
|
|
||||||
use crate::util::sighash;
|
use crate::util::sighash;
|
||||||
|
|
||||||
/// A replacement for SigHashComponents which supports all sighash modes
|
/// A replacement for SigHashComponents which supports all sighash modes
|
||||||
|
|
|
@ -5,12 +5,14 @@
|
||||||
//!
|
//!
|
||||||
//! This module provides ECDSA signatures used Bitcoin that can be roundtrip (de)serialized.
|
//! This module provides ECDSA signatures used Bitcoin that can be roundtrip (de)serialized.
|
||||||
|
|
||||||
use crate::prelude::*;
|
|
||||||
use core::str::FromStr;
|
use core::str::FromStr;
|
||||||
use core::{fmt, iter};
|
use core::{fmt, iter};
|
||||||
|
|
||||||
|
use secp256k1;
|
||||||
|
|
||||||
|
use crate::prelude::*;
|
||||||
use crate::hashes::hex::{self, FromHex};
|
use crate::hashes::hex::{self, FromHex};
|
||||||
use crate::blockdata::transaction::NonStandardSighashType;
|
use crate::blockdata::transaction::NonStandardSighashType;
|
||||||
use secp256k1;
|
|
||||||
use crate::EcdsaSighashType;
|
use crate::EcdsaSighashType;
|
||||||
use crate::internal_macros::write_err;
|
use crate::internal_macros::write_err;
|
||||||
|
|
||||||
|
|
|
@ -2,17 +2,18 @@
|
||||||
|
|
||||||
use crate::prelude::*;
|
use crate::prelude::*;
|
||||||
use crate::io;
|
use crate::io;
|
||||||
|
|
||||||
use core::fmt;
|
use core::fmt;
|
||||||
use core::str::FromStr;
|
use core::str::FromStr;
|
||||||
use core::convert::TryFrom;
|
use core::convert::TryFrom;
|
||||||
|
|
||||||
use secp256k1;
|
use secp256k1::XOnlyPublicKey;
|
||||||
|
|
||||||
use crate::blockdata::script::Script;
|
use crate::blockdata::script::Script;
|
||||||
use crate::blockdata::witness::Witness;
|
use crate::blockdata::witness::Witness;
|
||||||
use crate::blockdata::transaction::{Transaction, TxOut, NonStandardSighashType, SighashTypeParseError};
|
use crate::blockdata::transaction::{Transaction, TxOut, NonStandardSighashType, SighashTypeParseError};
|
||||||
use crate::consensus::encode;
|
use crate::consensus::encode;
|
||||||
use crate::hashes::{self, hash160, ripemd160, sha256, sha256d};
|
use crate::hashes::{self, hash160, ripemd160, sha256, sha256d};
|
||||||
use secp256k1::XOnlyPublicKey;
|
|
||||||
use crate::util::bip32::KeySource;
|
use crate::util::bip32::KeySource;
|
||||||
use crate::util::psbt;
|
use crate::util::psbt;
|
||||||
use crate::util::psbt::map::Map;
|
use crate::util::psbt::map::Map;
|
||||||
|
@ -20,7 +21,6 @@ use crate::util::psbt::raw;
|
||||||
use crate::util::psbt::serialize::Deserialize;
|
use crate::util::psbt::serialize::Deserialize;
|
||||||
use crate::util::psbt::{Error, error};
|
use crate::util::psbt::{Error, error};
|
||||||
use crate::util::key::PublicKey;
|
use crate::util::key::PublicKey;
|
||||||
|
|
||||||
use crate::util::taproot::{ControlBlock, LeafVersion, TapLeafHash, TapBranchHash};
|
use crate::util::taproot::{ControlBlock, LeafVersion, TapLeafHash, TapBranchHash};
|
||||||
use crate::util::sighash;
|
use crate::util::sighash;
|
||||||
use crate::{EcdsaSighashType, SchnorrSighashType, EcdsaSig, SchnorrSig};
|
use crate::{EcdsaSighashType, SchnorrSighashType, EcdsaSig, SchnorrSig};
|
||||||
|
|
Loading…
Reference in New Issue