core, eth, internal: include read storage entries in structlog output (#21204)
* core, eth, internal: extend structLog tracer * core/vm, internal: add storage view * core, internal: add slots to storage directly * core: remove useless * core: address martin's comment * core/vm: fix tests
This commit is contained in:
@ -62,11 +62,11 @@ func TestStoreCapture(t *testing.T) {
|
||||
stack.push(uint256.NewInt())
|
||||
var index common.Hash
|
||||
logger.CaptureState(env, 0, SSTORE, 0, 0, mem, stack, rstack, contract, 0, nil)
|
||||
if len(logger.changedValues[contract.Address()]) == 0 {
|
||||
t.Fatalf("expected exactly 1 changed value on address %x, got %d", contract.Address(), len(logger.changedValues[contract.Address()]))
|
||||
if len(logger.storage[contract.Address()]) == 0 {
|
||||
t.Fatalf("expected exactly 1 changed value on address %x, got %d", contract.Address(), len(logger.storage[contract.Address()]))
|
||||
}
|
||||
exp := common.BigToHash(big.NewInt(1))
|
||||
if logger.changedValues[contract.Address()][index] != exp {
|
||||
t.Errorf("expected %x, got %x", exp, logger.changedValues[contract.Address()][index])
|
||||
if logger.storage[contract.Address()][index] != exp {
|
||||
t.Errorf("expected %x, got %x", exp, logger.storage[contract.Address()][index])
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user