-
Notifications
You must be signed in to change notification settings - Fork 36
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
refactor: remove forkchoice casts #1126
Conversation
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.
Thanks for the PR, Gaston! I added some comments.
|
||
{:error, reason} -> | ||
Logger.error("[Fork choice] Failed to add block: #{reason}", slot: slot, root: block_root) | ||
GenServer.cast(from, {:block_processed, block_root, false}) | ||
:error |
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.
We should return the error with its reason and let the caller handle it.
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.
LGTM with two small comments.
This PR removes all
GenServer
casts fromForkChoice
.Casts were replaced by function calls from
PendingBlocks
.Also, makes
recompute_head
synchronous adding grafana metrics:Closes #1118