Use hexutil.Uint for blockCount parameter in feeHistory method (#23239)

* internal/ethapi/api: use hexutil.uint for blockCount parameter instead of int for feeHistory

* return hex value for oldestBlock instead of number

* return uint64 from oracle.resolveBlockRange

* eth/gasprice: fixed test

Co-authored-by: Zsolt Felfoldi <zsfelfoldi@gmail.com>
This commit is contained in:
lightclient
2021-07-27 05:27:28 +02:00
committed by GitHub
parent a1f16bc74c
commit bbfa6488ac
6 changed files with 28 additions and 27 deletions

View File

@ -32,7 +32,7 @@ func TestFeeHistory(t *testing.T) {
count int
last rpc.BlockNumber
percent []float64
expFirst rpc.BlockNumber
expFirst uint64
expCount int
expErr error
}{
@ -70,7 +70,7 @@ func TestFeeHistory(t *testing.T) {
expBaseFee++
}
if first != c.expFirst {
if first.Uint64() != c.expFirst {
t.Fatalf("Test case %d: first block mismatch, want %d, got %d", i, c.expFirst, first)
}
if len(reward) != expReward {