Commit fa0cc274 authored by Felix Lange's avatar Felix Lange

ethclient: use package hexutil for number encoding

parent 4cb29bde
......@@ -112,7 +112,7 @@ func (ec *Client) getBlock(ctx context.Context, method string, args ...interface
for i := range reqs {
reqs[i] = rpc.BatchElem{
Method: "eth_getUncleByBlockHashAndIndex",
Args: []interface{}{body.Hash, fmt.Sprintf("%#x", i)},
Args: []interface{}{body.Hash, hexutil.EncodeUint64(uint64(i))},
Result: &uncles[i],
}
}
......@@ -196,7 +196,7 @@ func toBlockNumArg(number *big.Int) string {
if number == nil {
return "latest"
}
return fmt.Sprintf("%#x", number)
return hexutil.EncodeBig(number)
}
type rpcProgress struct {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment