Skip to content

Commit cf7aca8

Browse files
committed
Remove usage of blockdata:: from bitcoin paths
In `rust-bitcoin` the `blockdata` module is a code organisation thing, it should never have been public. One day those guys would like to remove it, so as not to be a PITA for `bdk` when they do lets remove all usage of `blockdata::` now. Internal change only, no externally visible changes.
1 parent 5c7cc30 commit cf7aca8

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

crates/wallet/src/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use alloc::boxed::Box;
1313
use core::convert::AsRef;
1414

1515
use bdk_chain::ConfirmationTime;
16-
use bitcoin::blockdata::transaction::{OutPoint, Sequence, TxOut};
16+
use bitcoin::transaction::{OutPoint, Sequence, TxOut};
1717
use bitcoin::{psbt, Weight};
1818

1919
use serde::{Deserialize, Serialize};

crates/wallet/src/wallet/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2530,7 +2530,7 @@ fn create_signers<E: IntoWalletDescriptor>(
25302530
#[doc(hidden)]
25312531
macro_rules! floating_rate {
25322532
($rate:expr) => {{
2533-
use $crate::bitcoin::blockdata::constants::WITNESS_SCALE_FACTOR;
2533+
use $crate::bitcoin::constants::WITNESS_SCALE_FACTOR;
25342534
// sat_kwu / 250.0 -> sat_vb
25352535
$rate.to_sat_per_kwu() as f64 / ((1000 / WITNESS_SCALE_FACTOR) as f64)
25362536
}};

crates/wallet/tests/wallet.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,7 @@ fn new_or_load() -> anyhow::Result<()> {
201201
// wrong genesis hash
202202
{
203203
let exp_blockhash = BlockHash::all_zeros();
204-
let got_blockhash =
205-
bitcoin::blockdata::constants::genesis_block(Network::Testnet).block_hash();
204+
let got_blockhash = bitcoin::constants::genesis_block(Network::Testnet).block_hash();
206205

207206
let db = &mut new_or_load(&file_path).expect("must open db");
208207
let changeset = read(db)?;

nursery/tmp_plan/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ use bdk_chain::{bitcoin, collections::*, miniscript};
1818
use bitcoin::{
1919
absolute,
2020
bip32::{DerivationPath, Fingerprint, KeySource},
21-
blockdata::transaction::Sequence,
2221
ecdsa,
2322
hashes::{hash160, ripemd160, sha256},
2423
secp256k1::Secp256k1,
2524
taproot::{self, LeafVersion, TapLeafHash},
25+
transaction::Sequence,
2626
ScriptBuf, TxIn, Witness, WitnessVersion,
2727
};
2828
use miniscript::{

0 commit comments

Comments
 (0)