mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-01 02:37:37 +00:00
triedb/pathdb: prealloc node map in nodeSet.write (#35232)
This commit is contained in:
parent
04bf045303
commit
32986bf084
1 changed files with 1 additions and 1 deletions
|
|
@ -279,7 +279,7 @@ func (s *nodeSet) decode(r *rlp.Stream) error {
|
|||
|
||||
// write flushes nodes into the provided database batch as a whole.
|
||||
func (s *nodeSet) write(batch ethdb.Batch, clean *fastcache.Cache) int {
|
||||
nodes := make(map[common.Hash]map[string]*trienode.Node)
|
||||
nodes := make(map[common.Hash]map[string]*trienode.Node, len(s.storageNodes)+1)
|
||||
if len(s.accountNodes) > 0 {
|
||||
nodes[common.Hash{}] = s.accountNodes
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue