Skip to content

Commit

Permalink
Update the era with the value in current block's state
Browse files Browse the repository at this point in the history
At `on_term_close`, the term_common_params is not updated to the
new parameters yet. But the parameters in the current block's
state is updated, so we should get the `era` from there.
  • Loading branch information
remagpie authored and foriequal0 committed Dec 10, 2019
1 parent 5c64737 commit 7fba4f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/consensus/tendermint/engine.rs
Expand Up @@ -246,7 +246,7 @@ impl ConsensusEngine for Tendermint {

match term {
0 => {}
_ => match term_common_params.expect("Term common params should exist").era() {
_ => match metadata.params().map_or(0, |p| p.era()) {
0 => {}
1 => block.state_mut().snapshot_term_params()?,
_ => unimplemented!("It is not decided how we handle this"),
Expand Down

0 comments on commit 7fba4f5

Please sign in to comment.