mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 20:56:42 +00:00
core/types: prealloce map
This commit is contained in:
parent
33dbd64a23
commit
8d5c0894a5
1 changed files with 1 additions and 1 deletions
|
|
@ -75,7 +75,7 @@ func (ga *GenesisAlloc) UnmarshalJSON(data []byte) error {
|
||||||
if err := json.Unmarshal(data, &m); err != nil {
|
if err := json.Unmarshal(data, &m); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
*ga = make(GenesisAlloc)
|
*ga = make(GenesisAlloc, len(m))
|
||||||
for addr, a := range m {
|
for addr, a := range m {
|
||||||
(*ga)[common.Address(addr)] = a
|
(*ga)[common.Address(addr)] = a
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue