• Joshua Gutow's avatar
    op-chain-ops: Fix flaky TestCode · 76745bd8
    Joshua Gutow authored
    If getting an empty code value in the state DB, geth returns `nil`,
    not an empty array. This is funcationally equivalent if you are checking
    the length, but not the same if you expect to get the same object out
    that you put in. This now checks for this special case & prevents
    the test from flaking.
    
    This can be tested by running `go test ./state -count=10 -run=TestCode` in
    the op-chain-ops folder. Without this change the test will fail, with this
    change it will now pass.
    76745bd8
Name
Last commit
Last update
..
clients Loading commit data...
cmd/check-l2 Loading commit data...
contracts Loading commit data...
crossdomain Loading commit data...
deployer Loading commit data...
genesis Loading commit data...
immutables Loading commit data...
srcmap Loading commit data...
state Loading commit data...
.gitignore Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...