From 36d046f3ca5c5b9aa9b48c2a7608eec7a3770f7b Mon Sep 17 00:00:00 2001 From: Robert Habermeier Date: Tue, 29 Aug 2017 15:16:24 +0200 Subject: [PATCH] do not activate genesis epoch in immediate transition validator contract (#6349) --- ethcore/src/engines/authority_round/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ethcore/src/engines/authority_round/mod.rs b/ethcore/src/engines/authority_round/mod.rs index 194fdd8fe..508cd3e25 100644 --- a/ethcore/src/engines/authority_round/mod.rs +++ b/ethcore/src/engines/authority_round/mod.rs @@ -522,7 +522,9 @@ impl Engine for AuthorityRound { let parent_hash = block.fields().header.parent_hash().clone(); ::engines::common::push_last_hash(block, last_hashes.clone(), self, &parent_hash)?; - if !epoch_begin { return Ok(()) } + // with immediate transitions, we don't use the epoch mechanism anyway. + // the genesis is always considered an epoch, but we ignore it intentionally. + if self.immediate_transitions || !epoch_begin { return Ok(()) } // genesis is never a new block, but might as well check. let header = block.fields().header.clone();