-
Notifications
You must be signed in to change notification settings - Fork 266
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
Added onBestBlock event #587
Conversation
@@ -540,10 +540,13 @@ private void processBest(final Block block) { | |||
EventDispatchThread.invokeLater(() -> transactionPool.processBest(block)); | |||
} | |||
|
|||
private void onBlock(Block block, BlockResult result) { | |||
private void onBlock(Block block, BlockResult result, boolean isBest) { |
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.
Just to not repeat the same signature of the listeners, what if we call this method something like invokeListeners
?
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.
It looks good to me. Would be possible to squash the commits before merge?
SonarQube analysis reported 1 issue
|
* Added onBestBlock event * Changed flag for same checks in another method * Move inside the if the onBlock * Separate onBlock from onBestBlock
Added a new type of event that only emits IMPORTED_BEST blocks instead of any block.