-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove TimeIotaMs from ABCI consensus params #3403
Changes from all commits
c945d16
a2aabc6
740146c
a429d1f
e920e08
f9c81e3
1f98952
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -324,7 +324,12 @@ func (h *Handshaker) ReplayBlocks( | |
} | ||
|
||
if res.ConsensusParams != nil { | ||
state.ConsensusParams = types.PB2TM.ConsensusParams(res.ConsensusParams) | ||
// Preserve TimeIotaMs since it's not exposed to the application. | ||
timeIotaMs := state.ConsensusParams.Block.TimeIotaMs | ||
{ | ||
state.ConsensusParams = types.PB2TM.ConsensusParams(res.ConsensusParams) | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why the extra There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
state.ConsensusParams.Block.TimeIotaMs = timeIotaMs | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I did not verify that this is the only place where we do not want ABCI params to potentially overwrite There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, me executing
|
||
} | ||
sm.SaveState(h.stateDB, state) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like a better approach would be to build this into the PB2TM.ConsensusParams method. Then we know we'll never forget to do this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Openned #3432