diff --git a/bitcoin/src/util/bip152.rs b/bitcoin/src/bip152.rs similarity index 100% rename from bitcoin/src/util/bip152.rs rename to bitcoin/src/bip152.rs diff --git a/bitcoin/src/consensus/encode.rs b/bitcoin/src/consensus/encode.rs index 89599af4..5d22bda3 100644 --- a/bitcoin/src/consensus/encode.rs +++ b/bitcoin/src/consensus/encode.rs @@ -28,7 +28,7 @@ use crate::io::{self, Cursor, Read}; use crate::util::endian; use crate::util::psbt; -use crate::util::bip152::{ShortId, PrefilledTransaction}; +use crate::bip152::{ShortId, PrefilledTransaction}; use crate::util::taproot::TapLeafHash; use crate::hashes::hex::ToHex; diff --git a/bitcoin/src/lib.rs b/bitcoin/src/lib.rs index 2e039e22..8fd276d2 100644 --- a/bitcoin/src/lib.rs +++ b/bitcoin/src/lib.rs @@ -80,6 +80,7 @@ mod serde_utils; #[macro_use] pub mod network; pub mod address; +pub mod bip152; pub mod bip158; pub mod bip32; pub mod blockdata; diff --git a/bitcoin/src/network/message.rs b/bitcoin/src/network/message.rs index 17234df7..5e1b0ee1 100644 --- a/bitcoin/src/network/message.rs +++ b/bitcoin/src/network/message.rs @@ -486,7 +486,7 @@ mod test { use crate::network::message_bloom::{FilterAdd, FilterLoad, BloomFlags}; use crate::MerkleBlock; use crate::network::message_compact_blocks::{GetBlockTxn, SendCmpct}; - use crate::util::bip152::BlockTransactionsRequest; + use crate::bip152::BlockTransactionsRequest; fn hash(slice: [u8;32]) -> Hash { Hash::from_slice(&slice).unwrap() diff --git a/bitcoin/src/network/message_compact_blocks.rs b/bitcoin/src/network/message_compact_blocks.rs index 19fe42d7..6a92a15d 100644 --- a/bitcoin/src/network/message_compact_blocks.rs +++ b/bitcoin/src/network/message_compact_blocks.rs @@ -3,7 +3,7 @@ //! use crate::internal_macros::impl_consensus_encoding; -use crate::util::bip152; +use crate::bip152; /// sendcmpct message #[derive(PartialEq, Eq, Clone, Debug, Copy, PartialOrd, Ord, Hash)] diff --git a/bitcoin/src/util/mod.rs b/bitcoin/src/util/mod.rs index acd1668c..a34b8212 100644 --- a/bitcoin/src/util/mod.rs +++ b/bitcoin/src/util/mod.rs @@ -11,7 +11,6 @@ pub mod ecdsa; pub mod schnorr; pub mod amount; pub mod base58; -pub mod bip152; pub mod hash; pub mod merkleblock; pub mod psbt; diff --git a/fuzz/fuzz_targets/deserialize_prefilled_transaction.rs b/fuzz/fuzz_targets/deserialize_prefilled_transaction.rs index 1da8ec48..fce2f03e 100644 --- a/fuzz/fuzz_targets/deserialize_prefilled_transaction.rs +++ b/fuzz/fuzz_targets/deserialize_prefilled_transaction.rs @@ -2,7 +2,7 @@ extern crate bitcoin; fn do_test(data: &[u8]) { // We already fuzz Transactions in `./deserialize_transaction.rs`. - let tx_result: Result = bitcoin::consensus::encode::deserialize(data); + let tx_result: Result = bitcoin::consensus::encode::deserialize(data); match tx_result { Err(_) => {},