Commit 8d79e795 authored by Mark Tyneway's avatar Mark Tyneway

op-chain-ops: sanity check not empty bytecode

Sanity check that empty bytecode is not set in the state
for the `Proxy`. There are other checks for this after
the migration happens and this never should happen so this
is just a sanity check to catch a problem earlier in the process.
parent 12e782df
package genesis
import (
"errors"
"fmt"
"math/big"
......@@ -109,6 +110,9 @@ func setProxies(db vm.StateDB, proxyAdminAddr common.Address, namespace *big.Int
if err != nil {
return err
}
if len(depBytecode) == 0 {
return errors.New("Proxy has empty bytecode")
}
for i := uint64(0); i <= count; i++ {
bigAddr := new(big.Int).Or(namespace, new(big.Int).SetUint64(i))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment