From 95393aadbcd2aee249dffd515d88e1da65561f67 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Wed, 24 Aug 2022 16:33:05 +1000 Subject: [PATCH] Move bip158 module to crate root We are attempting to flatten the `util` module; move the `bip158` module to the crate root out of `util`. Currently `src/util/` is ignored by the formatter so this move causes the `bip32` module to be formatted. --- src/{util => }/bip158.rs | 2 +- src/lib.rs | 1 + src/util/mod.rs | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) rename src/{util => }/bip158.rs (99%) diff --git a/src/util/bip158.rs b/src/bip158.rs similarity index 99% rename from src/util/bip158.rs rename to src/bip158.rs index de3492b0..478ff70e 100644 --- a/src/util/bip158.rs +++ b/src/bip158.rs @@ -567,7 +567,7 @@ mod test { fn test_blockfilters() { // test vectors from: https://github.com/jimpo/bitcoin/blob/c7efb652f3543b001b4dd22186a354605b14f47e/src/test/data/blockfilters.json - let data = include_str!("../../test_data/blockfilters.json"); + let data = include_str!("../test_data/blockfilters.json"); let testdata = serde_json::from_str::(data).unwrap().as_array().unwrap().clone(); for t in testdata.iter().skip(1) { diff --git a/src/lib.rs b/src/lib.rs index 6ab36cf0..13c23718 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -80,6 +80,7 @@ mod serde_utils; #[macro_use] pub mod network; pub mod address; +pub mod bip158; pub mod blockdata; pub mod consensus; pub mod error; diff --git a/src/util/mod.rs b/src/util/mod.rs index 36ed53d0..52f61ecd 100644 --- a/src/util/mod.rs +++ b/src/util/mod.rs @@ -20,7 +20,6 @@ pub mod misc; pub mod psbt; pub mod taproot; pub mod uint; -pub mod bip158; pub mod sighash; pub(crate) mod endian; @@ -117,3 +116,6 @@ pub(crate) fn read_to_end(mut d: D) -> Result, io::Error> { pub mod address { pub use crate::address::*; } + +#[deprecated(since = "0.30.0", note = "Please use crate::bip158")] +pub use crate::bip158;