Skip to content

Commit

Permalink
Remove primitives::constants module
Browse files Browse the repository at this point in the history
Inline the code out of `primitives/constants.rs` into
`primitives/mod.rs`.

Refactor only, no logic changes.
  • Loading branch information
tcharding committed Sep 21, 2022
1 parent fde0bb7 commit d06d7cc
Show file tree
Hide file tree
Showing 8 changed files with 313 additions and 325 deletions.
2 changes: 1 addition & 1 deletion bitcoin/src/address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ use crate::hashes::{sha256, Hash, HashEngine};
use crate::internal_macros::serde_string_impl;
use crate::network::constants::Network;
use crate::prelude::*;
use crate::primitives::constants::{
use crate::primitives::{
MAX_SCRIPT_ELEMENT_SIZE, PUBKEY_ADDRESS_PREFIX_MAIN, PUBKEY_ADDRESS_PREFIX_TEST,
SCRIPT_ADDRESS_PREFIX_MAIN, SCRIPT_ADDRESS_PREFIX_TEST,
};
Expand Down
1 change: 0 additions & 1 deletion bitcoin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ pub use crate::consensus::encode::VarInt;
pub use crate::hash_types::*;
pub use crate::network::constants::Network;
pub use crate::primitives::block::{self, Block, BlockHeader, BlockVersion};
pub use crate::primitives::constants;
pub use crate::primitives::locktime::{self, absolute, relative};
pub use crate::primitives::transaction::{self, OutPoint, Sequence, Transaction, TxIn, TxOut};
pub use crate::primitives::witness::{self, Witness};
Expand Down
2 changes: 1 addition & 1 deletion bitcoin/src/policy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

use core::cmp;

use super::primitives::constants::{MAX_BLOCK_SIGOPS_COST, WITNESS_SCALE_FACTOR};
use super::primitives::{MAX_BLOCK_SIGOPS_COST, WITNESS_SCALE_FACTOR};

/// Maximum weight of a transaction for it to be relayed by most nodes on the network
pub const MAX_STANDARD_TX_WEIGHT: u32 = 400_000;
Expand Down
2 changes: 1 addition & 1 deletion bitcoin/src/primitives/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use crate::util::uint::Uint256;
use crate::consensus::{encode, Encodable, Decodable};
use crate::network::constants::Network;
use crate::primitives::transaction::Transaction;
use crate::primitives::constants::{max_target, WITNESS_SCALE_FACTOR};
use crate::primitives::{max_target, WITNESS_SCALE_FACTOR};
use crate::script;
use crate::VarInt;
use crate::internal_macros::impl_consensus_encoding;
Expand Down
314 changes: 0 additions & 314 deletions bitcoin/src/primitives/constants.rs

This file was deleted.

0 comments on commit d06d7cc

Please sign in to comment.