From 8d5c0894a5240d2d82cfb5ef0e241b734fa1b298 Mon Sep 17 00:00:00 2001 From: cuiweixie Date: Tue, 28 Oct 2025 01:44:08 +0800 Subject: [PATCH] core/types: prealloce map --- core/types/account.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/types/account.go b/core/types/account.go index bcfb83418c..831e09d43a 100644 --- a/core/types/account.go +++ b/core/types/account.go @@ -75,7 +75,7 @@ func (ga *GenesisAlloc) UnmarshalJSON(data []byte) error { if err := json.Unmarshal(data, &m); err != nil { return err } - *ga = make(GenesisAlloc) + *ga = make(GenesisAlloc, len(m)) for addr, a := range m { (*ga)[common.Address(addr)] = a }