-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[R4R] rm duplicate update/delete on tire #1001
Conversation
core/state/state_object.go
Outdated
@@ -412,12 +412,10 @@ func (s *StateObject) updateTrie(db Database) Trie { | |||
s.originStorage[key] = value | |||
var v []byte | |||
if (value == common.Hash{}) { | |||
s.setError(tr.TryDelete(key[:])) | |||
s.db.StorageDeleted += 1 |
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.
StorageDeleted & StorageUpdated
were added for storage metrics, but seems no longer used and can be deleted?
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.
duplicate update/delete should cause by error merge action since it has already removed by this pr
https://github.com/bnb-chain/bsc/pull/924/commits
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.
seems that some commit might not merged well.
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
The base branch was changed.
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
af5aaf2
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
Description
trie.update
/trie.delete
had been done twice which is redundantLock
could just be used to protect concurrent access onstatedb.snapStorage
, not thestorage
itself.Rationale
N/A
Example
N/A
Changes
Notable changes:
Unlock
earlier.