mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Update core/genesis.go
Co-authored-by: Martin Holst Swende <martin@swende.se> Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
parent
bb52ad61fb
commit
5cab73e4fa
1 changed files with 3 additions and 7 deletions
|
|
@ -611,14 +611,10 @@ func DeveloperGenesisBlock(gasLimit uint64, faucet common.Address, genesisAlloc
|
|||
}
|
||||
|
||||
if genesisAlloc != nil {
|
||||
precompiled := map[common.Address]struct{}{}
|
||||
for addr := range alloc {
|
||||
precompiled[addr] = struct{}{}
|
||||
}
|
||||
for addr, account := range *genesisAlloc {
|
||||
// Don't overwrite the precompiled accounts
|
||||
if _, ok := precompiled[addr]; ok {
|
||||
log.Crit("DeveloperGenesisBlock: can't overwrite precompiled account", "address", addr)
|
||||
// Don't allow overwriting the predefined accounts (precompiles)
|
||||
if _, ok := alloc[addr]; ok {
|
||||
log.Crit("Overwriting precompiles disallowed", "address", addr)
|
||||
}
|
||||
alloc[addr] = account
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue