Skip to content

Commit a747a55

Browse files
committed
pre alloc capacity for storageNodes
1 parent 7ec72cb commit a747a55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

triedb/pathdb/nodes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func newNodeSet(nodes map[common.Hash]map[string]*trienode.Node) *nodeSet {
5050
}
5151
s := &nodeSet{
5252
accountNodes: make(map[string]*trienode.Node),
53-
storageNodes: make(map[common.Hash]map[string]*trienode.Node),
53+
storageNodes: make(map[common.Hash]map[string]*trienode.Node, len(nodes)),
5454
}
5555
for owner, subset := range nodes {
5656
if owner == (common.Hash{}) {

0 commit comments

Comments
 (0)