Move bip152 module to crate root
We are attempting to flatten the `util` module; move the `bip152` module to the crate root out of `util`. Currently `src/util/` is ignored by the formatter so this move causes the `bip152` module to be formatted.
This commit is contained in:
parent
121db506fa
commit
facd8ba556
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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)]
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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::util::bip152::PrefilledTransaction, _> = bitcoin::consensus::encode::deserialize(data);
|
||||
let tx_result: Result<bitcoin::bip152::PrefilledTransaction, _> = bitcoin::consensus::encode::deserialize(data);
|
||||
|
||||
match tx_result {
|
||||
Err(_) => {},
|
||||
|
|
Loading…
Reference in New Issue