From d584160a70589d723dae6e57f2cead3d5ecc5a34 Mon Sep 17 00:00:00 2001 From: maskpp Date: Fri, 13 Sep 2024 22:29:31 +0800 Subject: [PATCH] fix test cases --- eth/tracers/logger/logger_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eth/tracers/logger/logger_test.go b/eth/tracers/logger/logger_test.go index 20dae42843..8779faf6f0 100644 --- a/eth/tracers/logger/logger_test.go +++ b/eth/tracers/logger/logger_test.go @@ -94,19 +94,19 @@ func TestStructLogMarshalingOmitEmpty(t *testing.T) { `{"pc":0,"op":"STOP","gas":0,"gasCost":0,"depth":0,"error":"this failed"}`}, {"with mem", &StructLog{Memory: make([]byte, 2), MemorySize: 2}, `{"pc":0,"op":0,"gas":"0x0","gasCost":"0x0","memory":"0x0000","memSize":2,"stack":null,"depth":0,"refund":0,"opName":"STOP"}`, - `{"pc":0,"op":"STOP","gas":0,"gasCost":0,"depth":0,"memory":[]}`}, + `{"pc":0,"op":"STOP","gas":0,"gasCost":0,"depth":0}`}, {"with 0-size mem", &StructLog{Memory: make([]byte, 0)}, `{"pc":0,"op":0,"gas":"0x0","gasCost":"0x0","memSize":0,"stack":null,"depth":0,"refund":0,"opName":"STOP"}`, - `{"pc":0,"op":"STOP","gas":0,"gasCost":0,"depth":0,"memory":[]}`}, + `{"pc":0,"op":"STOP","gas":0,"gasCost":0,"depth":0}`}, {"with stack mem", &StructLog{Memory: make([]byte, 0), Stack: make([]uint256.Int, 0)}, `{"pc":0,"op":0,"gas":"0x0","gasCost":"0x0","memSize":0,"stack":[],"depth":0,"refund":0,"opName":"STOP"}`, - `{"pc":0,"op":"STOP","gas":0,"gasCost":0,"depth":0,"stack":[],"memory":[]}`}, + `{"pc":0,"op":"STOP","gas":0,"gasCost":0,"depth":0}`}, {"with empty storage", &StructLog{Memory: make([]byte, 32), Storage: make(map[common.Hash]common.Hash)}, `{"pc":0,"op":0,"gas":"0x0","gasCost":"0x0","memory":"0x0000000000000000000000000000000000000000000000000000000000000000","memSize":0,"stack":null,"depth":0,"refund":0,"opName":"STOP"}`, - `{"pc":0,"op":"STOP","gas":0,"gasCost":0,"depth":0,"memory":["0000000000000000000000000000000000000000000000000000000000000000"],"storage":{}}`}, + `{"pc":0,"op":"STOP","gas":0,"gasCost":0,"depth":0,"memory":["0x0000000000000000000000000000000000000000000000000000000000000000"]}`}, {"with storage", &StructLog{Storage: map[common.Hash]common.Hash{common.HexToHash("0x1234"): common.HexToHash("0xaabb")}}, `{"pc":0,"op":0,"gas":"0x0","gasCost":"0x0","memSize":0,"stack":null,"depth":0,"refund":0,"opName":"STOP"}`, - `{"pc":0,"op":"STOP","gas":0,"gasCost":0,"depth":0,"storage":{"0000000000000000000000000000000000000000000000000000000000001234":"000000000000000000000000000000000000000000000000000000000000aabb"}}`}, + `{"pc":0,"op":"STOP","gas":0,"gasCost":0,"depth":0,"storage":{"0000000000000000000000000000000000000000000000000000000000001234":"0x000000000000000000000000000000000000000000000000000000000000aabb"}}`}, } for _, tt := range tests {