-
Notifications
You must be signed in to change notification settings - Fork 0
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
chore: updated by review tips #15
Conversation
d7fd7a5
to
0d229af
Compare
triedb/pathdb/difflayer.go
Outdated
for _, subset := range dl.nodes { | ||
for _, node := range subset { | ||
h.set(node.Hash, node) | ||
} | ||
} | ||
diffHashCacheLengthGauge.Update(int64(h.length())) | ||
log.Debug("Add difflayer to hash map", "root", ly.rootHash(), "map_len", h.length()) | ||
log.Info("Add difflayer to hash map", "root", ly.rootHash(), "block_number", dl.block, "map_len", h.length(), "add_delta", h.length()-beforeAdd) |
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.
debug.
triedb/pathdb/difflayer.go
Outdated
for _, subset := range dl.nodes { | ||
for _, node := range subset { | ||
h.del(node.Hash) | ||
} | ||
} | ||
diffHashCacheLengthGauge.Update(int64(h.length())) | ||
log.Debug("Remove difflayer from hash map", "root", ly.rootHash(), "map_len", h.length()) | ||
log.Info("Remove difflayer from hash map", "root", ly.rootHash(), "block_number", dl.block, "map_len", h.length(), "del_delta", beforeDel-h.length()) |
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.
debug.
triedb/pathdb/layertree.go
Outdated
@@ -129,14 +140,32 @@ func (tree *layerTree) cap(root common.Hash, layers int) error { | |||
tree.lock.Lock() | |||
defer tree.lock.Unlock() | |||
|
|||
defer func() { |
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.
remove.
triedb/pathdb/layertree.go
Outdated
@@ -198,6 +229,7 @@ func (tree *layerTree) cap(root common.Hash, layers int) error { | |||
for root, layer := range tree.layers { | |||
if dl, ok := layer.(*diskLayer); ok && dl.isStale() { | |||
remove(root) | |||
log.Info("Remove stale the disklayer", "disk_root", dl.root.String()) |
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.
debug.
28bcfe0
to
8e6e681
Compare
Description
add a description of your changes here...
Rationale
tell us why we need these changes...
Example
add an example CLI or API response...
Changes
Notable changes: