mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
to be consistent with WatchOpts
which is at accounts/abi/bind/base.go:85
This commit is contained in:
parent
ae707445f5
commit
376d283669
2 changed files with 2 additions and 6 deletions
|
|
@ -467,11 +467,7 @@ func toFilterArg(q ethereum.FilterQuery) (interface{}, error) {
|
|||
return nil, errors.New("cannot specify both BlockHash and FromBlock/ToBlock")
|
||||
}
|
||||
} else {
|
||||
if q.FromBlock == nil {
|
||||
arg["fromBlock"] = "0x0"
|
||||
} else {
|
||||
arg["fromBlock"] = toBlockNumArg(q.FromBlock)
|
||||
}
|
||||
arg["fromBlock"] = toBlockNumArg(q.FromBlock)
|
||||
arg["toBlock"] = toBlockNumArg(q.ToBlock)
|
||||
}
|
||||
return arg, nil
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ func TestToFilterArg(t *testing.T) {
|
|||
},
|
||||
map[string]interface{}{
|
||||
"address": addresses,
|
||||
"fromBlock": "0x0",
|
||||
"fromBlock": "latest",
|
||||
"toBlock": "latest",
|
||||
"topics": [][]common.Hash{},
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue