Skip to content

Commit 737c954

Browse files
committed
chore: organize some imports
1 parent 697286c commit 737c954

File tree

3 files changed

+15
-18
lines changed

3 files changed

+15
-18
lines changed

crates/bdk/src/wallet/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ use bdk_chain::{
3333
use bitcoin::secp256k1::{All, Secp256k1};
3434
use bitcoin::sighash::{EcdsaSighashType, TapSighashType};
3535
use bitcoin::{
36-
absolute, Address, Block, FeeRate, Network, OutPoint, Script, ScriptBuf, Sequence, Transaction, TxOut,
37-
Txid, Weight, Witness,
36+
absolute, Address, Block, FeeRate, Network, OutPoint, Script, ScriptBuf, Sequence, Transaction,
37+
TxOut, Txid, Weight, Witness,
3838
};
3939
use bitcoin::{consensus::encode::serialize, BlockHash};
4040
use bitcoin::{constants::genesis_block, psbt};

crates/bdk/src/wallet/tx_builder.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,23 +40,21 @@
4040
//! # Ok::<(), anyhow::Error>(())
4141
//! ```
4242
43-
use crate::collections::BTreeMap;
44-
use crate::collections::HashSet;
4543
use alloc::{boxed::Box, rc::Rc, string::String, vec::Vec};
46-
use bdk_chain::PersistBackend;
4744
use core::cell::RefCell;
4845
use core::fmt;
4946
use core::marker::PhantomData;
5047

48+
use bdk_chain::PersistBackend;
5149
use bitcoin::psbt::{self, PartiallySignedTransaction as Psbt};
52-
use bitcoin::{absolute, script::PushBytes, OutPoint, ScriptBuf, Sequence, Transaction, Txid};
50+
use bitcoin::script::PushBytes;
51+
use bitcoin::{absolute, FeeRate, OutPoint, ScriptBuf, Sequence, Transaction, Txid};
5352

5453
use super::coin_selection::{CoinSelectionAlgorithm, DefaultCoinSelectionAlgorithm};
55-
use super::ChangeSet;
56-
use crate::types::{KeychainKind, LocalOutput, WeightedUtxo};
57-
use crate::wallet::CreateTxError;
58-
use crate::{Utxo, Wallet};
59-
use bitcoin::FeeRate;
54+
use super::{ChangeSet, CreateTxError, Wallet};
55+
use crate::collections::{BTreeMap, HashSet};
56+
use crate::{KeychainKind, LocalOutput, Utxo, WeightedUtxo};
57+
6058
/// Context in which the [`TxBuilder`] is valid
6159
pub trait TxBuilderContext: core::fmt::Debug + Default + Clone {}
6260

crates/bdk/tests/wallet.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,15 @@ use bdk::KeychainKind;
1313
use bdk_chain::COINBASE_MATURITY;
1414
use bdk_chain::{BlockId, ConfirmationTime};
1515
use bitcoin::hashes::Hash;
16+
use bitcoin::psbt;
17+
use bitcoin::script::PushBytesBuf;
1618
use bitcoin::sighash::{EcdsaSighashType, TapSighashType};
17-
use bitcoin::Amount;
18-
use bitcoin::FeeRate;
19-
use bitcoin::ScriptBuf;
19+
use bitcoin::taproot::TapNodeHash;
2020
use bitcoin::{
21-
absolute, script::PushBytesBuf, taproot::TapNodeHash, Address, OutPoint, Sequence, Transaction,
22-
TxIn, TxOut, Weight,
21+
absolute, Address, Amount, BlockHash, FeeRate, Network, OutPoint, ScriptBuf, Sequence,
22+
Transaction, TxIn, TxOut, Txid, Weight,
2323
};
24-
use bitcoin::{psbt, Network};
25-
use bitcoin::{BlockHash, Txid};
24+
2625
mod common;
2726
use common::*;
2827

0 commit comments

Comments
 (0)