mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 10:50:44 +00:00
fix(accounts): not use magic numbers for rpc.BlockNumber (#2016)
This commit is contained in:
parent
44b4a51ed4
commit
798b0cdf2f
1 changed files with 2 additions and 2 deletions
|
|
@ -830,11 +830,11 @@ func (b *SimulatedBackend) FilterLogs(ctx context.Context, query ethereum.Filter
|
||||||
filter = b.filterSystem.NewBlockFilter(*query.BlockHash, query.Addresses, query.Topics)
|
filter = b.filterSystem.NewBlockFilter(*query.BlockHash, query.Addresses, query.Topics)
|
||||||
} else {
|
} else {
|
||||||
// Initialize unset filter boundaried to run from genesis to chain head
|
// Initialize unset filter boundaried to run from genesis to chain head
|
||||||
from := int64(0)
|
from := rpc.EarliestBlockNumber.Int64()
|
||||||
if query.FromBlock != nil {
|
if query.FromBlock != nil {
|
||||||
from = query.FromBlock.Int64()
|
from = query.FromBlock.Int64()
|
||||||
}
|
}
|
||||||
to := int64(-1)
|
to := rpc.LatestBlockNumber.Int64()
|
||||||
if query.ToBlock != nil {
|
if query.ToBlock != nil {
|
||||||
to = query.ToBlock.Int64()
|
to = query.ToBlock.Int64()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue