Skip to content

Commit

Permalink
Fix debug_traceBlockByNumber to use hex
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaliy committed Sep 25, 2024
1 parent 3a1b4c2 commit 84b2500
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/evm/jsonrpc/jsonrpctest/jsonrpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ func TestRPCTraceBlock(t *testing.T) {
context.Background(),
&res1,
"debug_traceBlockByNumber",
env.BlockNumber(),
hexutil.Uint64(env.BlockNumber()).String(),
tracers.TraceConfig{TracerConfig: []byte(`{"tracer": "callTracer"}`)},
)
require.NoError(t, err)
Expand Down
4 changes: 2 additions & 2 deletions packages/evm/jsonrpc/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -554,9 +554,9 @@ func (d *DebugService) TraceTransaction(txHash common.Hash, config *tracers.Trac
})
}

func (d *DebugService) TraceBlockByNumber(blockNumber uint64, config *tracers.TraceConfig) (interface{}, error) {
func (d *DebugService) TraceBlockByNumber(blockNumber hexutil.Uint64, config *tracers.TraceConfig) (interface{}, error) {
return withMetrics(d.metrics, "debug_traceBlockByNumber", func() (interface{}, error) {
return d.evmChain.TraceBlockByNumber(blockNumber, config)
return d.evmChain.TraceBlockByNumber(uint64(blockNumber), config)
})
}

Expand Down

0 comments on commit 84b2500

Please sign in to comment.