diff --git a/consensus/bor/bor.go b/consensus/bor/bor.go index 7f0e0a2cf2..d6d00211cf 100644 --- a/consensus/bor/bor.go +++ b/consensus/bor/bor.go @@ -882,7 +882,9 @@ func (c *Bor) changeContractCodeIfNeeded(headerNumber uint64, state *state.State for addr, account := range allocs { log.Info("change contract code", "address", addr) state.SetCode(addr, account.Code) - state.SetBalance(addr, account.Balance) + if account.Balance == big.NewInt(0) { + state.SetBalance(addr, account.Balance) + } } } }