-
Notifications
You must be signed in to change notification settings - Fork 897
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
Ensure block height manager is restarted when BFT coordinator is #8308
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
…ithout calling reset Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
@@ -115,6 +115,7 @@ public void stop() { | |||
LOG.debug("Interrupted while waiting for BftProcessor to stop.", e); | |||
Thread.currentThread().interrupt(); | |||
} | |||
eventHandler.reset(); |
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.
Reset seems odd here in that we trying to stop all processing of BFT here. A stop method to prevent any more processing in the controller would make sense. With everything stopped, we won't be processing BFT events anyway so maybe it's not worth it?
And by a stop method on the controller I'm thinking it would change the started state to false as it does right now in the reset method and also replace the block height manager with the noop version so it wouldn't do any processing of events.
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.
Yeah I originally called it stop()
, but as it wasn't doing anything other than reset the state var I wasn't sure it was quite right. But I'm fine with using that term, and I'll add in replacing the block height manager at the same time as you've suggested.
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
…pped Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
Signed-off-by: Matt Whitehead <matthew.whitehead@kaleido.io>
df1e619
to
881d371
Compare
881d371
to
03b17a6
Compare
@jframe I think it's ready for another look now, thanks |
PR description
Some changes were made to the BFT mining coordinator to ensure it could be stopped and started (see #5861). A bug in those changes meant that when it was restarted, a new block height manager wasn't created.
This PR ensures that when BFT mining is restarted, so is the block height manager.
Fixed Issue(s)
Fixes #8307