Changed constants from `static` to `const` and added 2 new constants
This commit is contained in:
parent
1a4bb371a1
commit
56f98e00a0
|
@ -30,15 +30,20 @@ use util::misc::hex_bytes;
|
||||||
use util::uint::Uint256;
|
use util::uint::Uint256;
|
||||||
|
|
||||||
/// The maximum allowable sequence number
|
/// The maximum allowable sequence number
|
||||||
pub static MAX_SEQUENCE: u32 = 0xFFFFFFFF;
|
pub const MAX_SEQUENCE: u32 = 0xFFFFFFFF;
|
||||||
/// How many satoshis are in "one bitcoin"
|
/// How many satoshis are in "one bitcoin"
|
||||||
pub static COIN_VALUE: u64 = 100_000_000;
|
pub const COIN_VALUE: u64 = 100_000_000;
|
||||||
/// How many seconds between blocks we expect on average
|
/// How many seconds between blocks we expect on average
|
||||||
pub static TARGET_BLOCK_SPACING: u32 = 600;
|
pub const TARGET_BLOCK_SPACING: u32 = 600;
|
||||||
/// How many blocks between diffchanges
|
/// How many blocks between diffchanges
|
||||||
pub static DIFFCHANGE_INTERVAL: u32 = 2016;
|
pub const DIFFCHANGE_INTERVAL: u32 = 2016;
|
||||||
/// How much time on average should occur between diffchanges
|
/// How much time on average should occur between diffchanges
|
||||||
pub static DIFFCHANGE_TIMESPAN: u32 = 14 * 24 * 3600;
|
pub const DIFFCHANGE_TIMESPAN: u32 = 14 * 24 * 3600;
|
||||||
|
/// The maximum allowed weight for a block, see BIP 141 (network rule)
|
||||||
|
pub const MAX_BLOCK_WEIGHT: u32 = 4_000_000;
|
||||||
|
/// The minimum transaction weight for a valid serialized transaction
|
||||||
|
pub const MIN_TRANSACTION_WEIGHT: u32 = 4 * 60;
|
||||||
|
|
||||||
|
|
||||||
/// In Bitcoind this is insanely described as ~((u256)0 >> 32)
|
/// In Bitcoind this is insanely described as ~((u256)0 >> 32)
|
||||||
pub fn max_target(_: Network) -> Uint256 {
|
pub fn max_target(_: Network) -> Uint256 {
|
||||||
|
|
Loading…
Reference in New Issue