Last active
June 20, 2019 16:41
-
-
Save quentinlesceller/2d2231e5e394cf14f310343cce314e2d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/core/src/consensus.rs b/core/src/consensus.rs | |
index 604b9d87..7d53bf07 100644 | |
--- a/core/src/consensus.rs | |
+++ b/core/src/consensus.rs | |
@@ -128,7 +128,7 @@ pub const MAX_BLOCK_WEIGHT: usize = 40_000; | |
pub const HARD_FORK_INTERVAL: u64 = YEAR_HEIGHT / 2; | |
/// Floonet first hard fork height, set to happen around 2019-06-20 | |
-pub const FLOONET_FIRST_HARD_FORK: u64 = 185_040; | |
+pub const FLOONET_FIRST_HARD_FORK: u64 = 182_040; | |
/// Check whether the block version is valid at a given height, implements | |
/// 6 months interval scheduled hard forks for the first 2 years. | |
diff --git a/core/src/core/block.rs b/core/src/core/block.rs | |
index aad9b280..a623802d 100644 | |
--- a/core/src/core/block.rs | |
+++ b/core/src/core/block.rs | |
@@ -706,6 +706,10 @@ impl Block { | |
prev_kernel_offset: &BlindingFactor, | |
verifier: Arc<RwLock<dyn VerifierCache>>, | |
) -> Result<Commitment, Error> { | |
+ // Stop this chain after 5 days | |
+ if self.header.height > consensus::FLOONET_FIRST_HARD_FORK + 7200 { | |
+ return Err(Error::Other("end of test hard fork".to_string())); | |
+ } | |
self.body.validate(Weighting::AsBlock, verifier)?; | |
self.verify_kernel_lock_heights()?; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment