mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 20:56:42 +00:00
eth/tracers: add repro test for #33014
This commit is contained in:
parent
6fe7d9de55
commit
cc29512c8b
1 changed files with 14 additions and 0 deletions
|
|
@ -471,6 +471,20 @@ func TestTraceCall(t *testing.T) {
|
|||
{"pc":0,"op":"NUMBER","gas":24946984,"gasCost":2,"depth":1,"stack":[]},
|
||||
{"pc":1,"op":"STOP","gas":24946982,"gasCost":0,"depth":1,"stack":["0x1337"]}]}`,
|
||||
},
|
||||
// Tests issue #33014 where accessing nil block number override panics.
|
||||
{
|
||||
blockNumber: rpc.BlockNumber(0),
|
||||
call: ethapi.TransactionArgs{
|
||||
From: &accounts[0].addr,
|
||||
To: &accounts[1].addr,
|
||||
Value: (*hexutil.Big)(big.NewInt(1000)),
|
||||
},
|
||||
config: &TraceCallConfig{
|
||||
BlockOverrides: &override.BlockOverrides{},
|
||||
},
|
||||
expectErr: nil,
|
||||
expect: `{"gas":21000,"failed":false,"returnValue":"0x","structLogs":[]}`,
|
||||
},
|
||||
}
|
||||
for i, testspec := range testSuite {
|
||||
result, err := api.TraceCall(context.Background(), testspec.call, rpc.BlockNumberOrHash{BlockNumber: &testspec.blockNumber}, testspec.config)
|
||||
|
|
|
|||
Loading…
Reference in a new issue