-
Notifications
You must be signed in to change notification settings - Fork 477
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
FCU should move GlobalWorldState Root #8154
base: master
Are you sure you want to change the base?
Conversation
src/Nethermind/Nethermind.Merge.Plugin/Handlers/ForkchoiceUpdatedHandler.cs
Outdated
Show resolved
Hide resolved
@@ -259,6 +232,7 @@ protected virtual bool IsOnMainChainBehindHead(Block newHeadBlock, ForkchoiceSta | |||
if (shouldUpdateHead) | |||
{ | |||
_blockTree.UpdateMainChain(blocks!, true, true); | |||
processingQueue.RunOnEmpty(() => globalWorldState.StateRoot = newHeadBlock.StateRoot!); |
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.
Main change here
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.
As pointed in the other PR, I'd prefer to keep one owner of the global state and leave it up to the BlockProcessor
to move the root as it wants to. FCU
should just notify the processor about the checkpoint being changed.
Changes
Types of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?
Notes on testing
Please run nodes.
Documentation
Remarks