Skip to content

Commit b2023ab

Browse files
committed
hex encode
1 parent 091a759 commit b2023ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rpc.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"context"
2121
"errors"
2222
"fmt"
23-
"strconv"
23+
//"strconv"
2424
"time"
2525

2626
"github.com/CortexFoundation/CortexTheseus/common/hexutil"
@@ -72,7 +72,7 @@ func (m *Monitor) rpcBlockByNumber(blockNumber uint64) (*types.Block, error) {
7272
rpcBlockMeter.Mark(1)
7373
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
7474
defer cancel()
75-
err := m.cl.CallContext(ctx, block, "ctxc_getBlockByNumber", "0x"+strconv.FormatUint(blockNumber, 16), true)
75+
err := m.cl.CallContext(ctx, block, "ctxc_getBlockByNumber", hexutil.EncodeUint64(blockNumber), true)
7676
if err == nil {
7777
return block, nil
7878
}

0 commit comments

Comments
 (0)