Skip to content

Commit b172e19

Browse files
committed
Update the era with the value in current block's state
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.
1 parent be7dbee commit b172e19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/consensus/tendermint/engine.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ impl ConsensusEngine for Tendermint {
298298

299299
match term {
300300
0 => {}
301-
_ => match era {
301+
_ => match metadata.params().map_or(0, |p| p.era()) {
302302
0 => {}
303303
1 => block.state_mut().snapshot_term_params()?,
304304
_ => unimplemented!("It is not decided how we handle this"),

0 commit comments

Comments
 (0)