pre alloc capacity for storageNodes

This commit is contained in:
maskpp 2025-11-02 14:15:18 +08:00
parent 7ec72cb807
commit a747a55ffb

View file

@ -50,7 +50,7 @@ func newNodeSet(nodes map[common.Hash]map[string]*trienode.Node) *nodeSet {
}
s := &nodeSet{
accountNodes: make(map[string]*trienode.Node),
storageNodes: make(map[common.Hash]map[string]*trienode.Node),
storageNodes: make(map[common.Hash]map[string]*trienode.Node, len(nodes)),
}
for owner, subset := range nodes {
if owner == (common.Hash{}) {