ethclient: serialize negative block number as "pending" (#21177)
Fixes #21175 Co-authored-by: sammy007 <sammy007@users.noreply.github.com> Co-authored-by: Adam Schmideg <adamschmideg@users.noreply.github.com>
This commit is contained in:
@ -97,6 +97,22 @@ func TestToFilterArg(t *testing.T) {
|
||||
},
|
||||
nil,
|
||||
},
|
||||
{
|
||||
"with negative fromBlock and negative toBlock",
|
||||
ethereum.FilterQuery{
|
||||
Addresses: addresses,
|
||||
FromBlock: big.NewInt(-1),
|
||||
ToBlock: big.NewInt(-1),
|
||||
Topics: [][]common.Hash{},
|
||||
},
|
||||
map[string]interface{}{
|
||||
"address": addresses,
|
||||
"fromBlock": "pending",
|
||||
"toBlock": "pending",
|
||||
"topics": [][]common.Hash{},
|
||||
},
|
||||
nil,
|
||||
},
|
||||
{
|
||||
"with blockhash",
|
||||
ethereum.FilterQuery{
|
||||
|
Reference in New Issue
Block a user