do not activate genesis epoch in immediate transition validator contract (#6349)

This commit is contained in:
Robert Habermeier 2017-08-29 15:16:24 +02:00 committed by Gav Wood
parent 53401d6962
commit 36d046f3ca

View File

@ -522,7 +522,9 @@ impl Engine for AuthorityRound {
let parent_hash = block.fields().header.parent_hash().clone(); let parent_hash = block.fields().header.parent_hash().clone();
::engines::common::push_last_hash(block, last_hashes.clone(), self, &parent_hash)?; ::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. // genesis is never a new block, but might as well check.
let header = block.fields().header.clone(); let header = block.fields().header.clone();