• 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
..
testdata Loading commit data...
encoding.go Loading commit data...
memory_db.go Loading commit data...
memory_db_test.go Loading commit data...
state.go Loading commit data...
state_test.go Loading commit data...