Ensure static validator set changes are recognized (#10467)

This commit is contained in:
Hernando Castano 2019-03-12 19:16:29 +01:00 committed by GitHub
parent 82a148a99b
commit 595dac6c3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1413,8 +1413,10 @@ impl Engine<EthereumMachine> for AuthorityRound {
let first = chain_head.number() == 0;
// apply immediate transitions.
// Apply transitions that don't require finality and should be enacted immediately (e.g from chain spec)
if let Some(change) = self.validators.is_epoch_end(first, chain_head) {
info!(target: "engine", "Immediately applying validator set change signalled at block {}", chain_head.number());
self.epoch_manager.lock().note_new_epoch();
let change = combine_proofs(chain_head.number(), &change, &[]);
return Some(change)
}