-
Notifications
You must be signed in to change notification settings - Fork 204
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
pass storageMarker as argument when SyncAccounts() is called #5188
pass storageMarker as argument when SyncAccounts() is called #5188
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## feat/sync-missing-trie-nodes #5188 +/- ##
===============================================================
Coverage ? 70.65%
===============================================================
Files ? 677
Lines ? 88061
Branches ? 0
===============================================================
Hits ? 62218
Misses ? 21152
Partials ? 4691 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
@@ -104,7 +102,7 @@ func NewUserAccountsSyncer(args ArgsNewUserAccountsSyncer) (*userAccountsSyncer, | |||
} | |||
|
|||
// SyncAccounts will launch the syncing method to gather all the data needed for userAccounts - it is a blocking method | |||
func (u *userAccountsSyncer) SyncAccounts(rootHash []byte) error { | |||
func (u *userAccountsSyncer) SyncAccounts(rootHash []byte, storageMarker common.StorageMarker) error { | |||
u.mutex.Lock() |
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.
Please add here a test for nil storageMarker argument. The code can panic on L135. You need to add CheckIfNil on the StorageMarker interface. Valid for validatorAccountsSyncer.go L82.
+ unit tests
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.
Done.
Reasoning behind the pull request
SyncBlock()
. However, the storage should not be marked as synced and active - not the whole trie was synced, but just a missing subtrie.Proposed changes
storageMarker
toSyncAccounts()
func. This way, a disabled storage marker can be given in case the db should not be marked as synced.Testing procedure
Pre-requisites
Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:
feat
branch created?feat
branch merging, do all satellite projects have a proper tag insidego.mod
?