mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
chg: try blocks hex ecnoding
This commit is contained in:
parent
0634d11d86
commit
10d9594b52
1 changed files with 2 additions and 2 deletions
|
|
@ -3,8 +3,8 @@ package server
|
|||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"strconv"
|
||||
|
||||
"github.com/ethereum/go-ethereum/common/hexutil"
|
||||
"github.com/ethereum/go-ethereum/common/math"
|
||||
"github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/ethereum/go-ethereum/rpc"
|
||||
|
|
@ -115,7 +115,7 @@ func getRpcBlockNumberFromString(blockNumber string) (rpc.BlockNumber, error) {
|
|||
case "safe":
|
||||
return rpc.SafeBlockNumber, nil
|
||||
default:
|
||||
blckNum, err := strconv.ParseUint(blockNumber, 10, 64)
|
||||
blckNum, err := hexutil.DecodeUint64(blockNumber)
|
||||
if err != nil {
|
||||
return rpc.BlockNumber(0), errors.New("invalid block number")
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue