mirror of https://github.com/status-im/op-geth.git
Merge pull request #3021 from bas-vk/ethclient-logs
ethclient: bugfix retrieving logs
This commit is contained in:
commit
f85f46461f
|
@ -269,7 +269,7 @@ func (ec *Client) NonceAt(ctx context.Context, account common.Address, blockNumb
|
||||||
// FilterLogs executes a filter query.
|
// FilterLogs executes a filter query.
|
||||||
func (ec *Client) FilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]vm.Log, error) {
|
func (ec *Client) FilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]vm.Log, error) {
|
||||||
var result []vm.Log
|
var result []vm.Log
|
||||||
err := ec.c.CallContext(ctx, &result, "eth_getFilterLogs", toFilterArg(q))
|
err := ec.c.CallContext(ctx, &result, "eth_getLogs", toFilterArg(q))
|
||||||
return result, err
|
return result, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -281,7 +281,7 @@ func (ec *Client) SubscribeFilterLogs(ctx context.Context, q ethereum.FilterQuer
|
||||||
func toFilterArg(q ethereum.FilterQuery) interface{} {
|
func toFilterArg(q ethereum.FilterQuery) interface{} {
|
||||||
arg := map[string]interface{}{
|
arg := map[string]interface{}{
|
||||||
"fromBlock": toBlockNumArg(q.FromBlock),
|
"fromBlock": toBlockNumArg(q.FromBlock),
|
||||||
"endBlock": toBlockNumArg(q.ToBlock),
|
"toBlock": toBlockNumArg(q.ToBlock),
|
||||||
"addresses": q.Addresses,
|
"addresses": q.Addresses,
|
||||||
"topics": q.Topics,
|
"topics": q.Topics,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue