Update epoch to fix height increment bug

This commit is contained in:
Paul Hauner 2018-07-21 13:41:12 +10:00
parent ae9aef5bce
commit f56b91f1ae

View File

@ -131,8 +131,7 @@ pub fn initialize_new_epoch(
"last_finalized_epoch" => new_cry_state.last_finalized_epoch); "last_finalized_epoch" => new_cry_state.last_finalized_epoch);
let new_act_state = ActiveState { let new_act_state = ActiveState {
height: act_state.height + 1, height: act_state.height,
// TODO: update to new randao
randao: act_state.randao, randao: act_state.randao,
ffg_voter_bitfield: Bitfield::new(), ffg_voter_bitfield: Bitfield::new(),
recent_attesters: vec![], recent_attesters: vec![],
@ -141,7 +140,7 @@ pub fn initialize_new_epoch(
recent_proposers: vec![] recent_proposers: vec![]
}; };
info!(log, "created new active state"; info!(log, "reset active state";
"height" => new_act_state.height); "height" => new_act_state.height);
(new_cry_state, new_act_state) (new_cry_state, new_act_state)