Skip to content

Commit

Permalink
Merge pull request #3506 from vitaliy-io/fix/debug_traceBlockByNumber…
Browse files Browse the repository at this point in the history
…-hex

Fix debug_traceBlockByNumber to use hex
  • Loading branch information
vitaliy-io authored Sep 27, 2024
2 parents 3a1b4c2 + 84b2500 commit c7601a5
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 c7601a5

Please sign in to comment.