From f56b91f1ae30e6d797045b3022376fb90a1ec22e Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Sat, 21 Jul 2018 13:41:12 +1000 Subject: [PATCH] Update epoch to fix height increment bug --- src/state/transition/epoch.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/state/transition/epoch.rs b/src/state/transition/epoch.rs index 089aa2a56c..7ca0993821 100644 --- a/src/state/transition/epoch.rs +++ b/src/state/transition/epoch.rs @@ -131,8 +131,7 @@ pub fn initialize_new_epoch( "last_finalized_epoch" => new_cry_state.last_finalized_epoch); let new_act_state = ActiveState { - height: act_state.height + 1, - // TODO: update to new randao + height: act_state.height, randao: act_state.randao, ffg_voter_bitfield: Bitfield::new(), recent_attesters: vec![], @@ -141,7 +140,7 @@ pub fn initialize_new_epoch( recent_proposers: vec![] }; - info!(log, "created new active state"; + info!(log, "reset active state"; "height" => new_act_state.height); (new_cry_state, new_act_state)