Skip to content

Commit

Permalink
Remove test_targets from Network trait and MainnetV0 impl
Browse files Browse the repository at this point in the history
Restore to original test flag
  • Loading branch information
vicsn committed Oct 7, 2024
1 parent 57a2adb commit 2a702bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
14 changes: 2 additions & 12 deletions console/network/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,9 @@ pub trait Network:
/// The fixed timestamp of the genesis block.
const GENESIS_TIMESTAMP: i64;
/// The genesis block coinbase target.
#[cfg(not(feature = "test"))]
const GENESIS_COINBASE_TARGET: u64 = (1u64 << 29).saturating_sub(1);
/// The genesis block coinbase target.
/// This is deliberately set to a low value (32) for testing purposes only.
#[cfg(feature = "test")]
const GENESIS_COINBASE_TARGET: u64 = (1u64 << 5).saturating_sub(1);
/// The genesis block proof target.
#[cfg(not(feature = "test"))]
const GENESIS_PROOF_TARGET: u64 = 1u64 << 27;
const GENESIS_COINBASE_TARGET: u64;
/// The genesis block proof target.
/// This is deliberately set to a low value (8) for testing purposes only.
#[cfg(feature = "test")]
const GENESIS_PROOF_TARGET: u64 = 1u64 << 3;
const GENESIS_PROOF_TARGET: u64;
/// The maximum number of solutions that can be included per block as a power of 2.
const MAX_SOLUTIONS_AS_POWER_OF_TWO: u8 = 2; // 4 solutions
/// The maximum number of solutions that can be included per block.
Expand Down
8 changes: 4 additions & 4 deletions console/network/src/mainnet_v0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,18 +136,18 @@ impl Network for MainnetV0 {
/// The network edition.
const EDITION: u16 = 0;
/// The genesis block coinbase target.
#[cfg(not(any(feature = "test", feature = "test_targets")))]
#[cfg(not(feature = "test"))]
const GENESIS_COINBASE_TARGET: u64 = (1u64 << 29).saturating_sub(1);
/// The genesis block coinbase target.
/// This is deliberately set to a low value (32) for testing purposes only.
#[cfg(any(feature = "test", feature = "test_targets"))]
#[cfg(feature = "test")]
const GENESIS_COINBASE_TARGET: u64 = (1u64 << 5).saturating_sub(1);
/// The genesis block proof target.
#[cfg(not(any(feature = "test", feature = "test_targets")))]
#[cfg(not(feature = "test"))]
const GENESIS_PROOF_TARGET: u64 = 1u64 << 27;
/// The genesis block proof target.
/// This is deliberately set to a low value (8) for testing purposes only.
#[cfg(any(feature = "test", feature = "test_targets"))]
#[cfg(feature = "test")]
const GENESIS_PROOF_TARGET: u64 = 1u64 << 3;
/// The fixed timestamp of the genesis block.
const GENESIS_TIMESTAMP: i64 = 1696118400 /* 2023-10-01 00:00:00 UTC */;
Expand Down

0 comments on commit 2a702bf

Please sign in to comment.