Lazy fix for eth_getLogs (#1620)

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
This commit is contained in:
ledgerwatch 2021-03-28 19:47:20 +01:00 committed by GitHub
parent 0685250095
commit 3b18c02edf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,11 +78,11 @@ func (api *APIImpl) GetLogs(ctx context.Context, crit filters.FilterCriteria) ([
}
begin = latest
if crit.FromBlock != nil {
if crit.FromBlock != nil && crit.FromBlock.Sign() > 0 {
begin = crit.FromBlock.Uint64()
}
end = latest
if crit.ToBlock != nil {
if crit.ToBlock != nil && crit.ToBlock.Sign() > 0 {
end = crit.ToBlock.Uint64()
}
}