diff --git a/ethclient/ethclient_test.go b/ethclient/ethclient_test.go index e9e5055e6c..606dd1131b 100644 --- a/ethclient/ethclient_test.go +++ b/ethclient/ethclient_test.go @@ -86,6 +86,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{