From 798b0cdf2f7611776c8f50fa064a2c8969b257d7 Mon Sep 17 00:00:00 2001 From: Daniel Liu <139250065@qq.com> Date: Thu, 5 Feb 2026 14:23:11 +0800 Subject: [PATCH] fix(accounts): not use magic numbers for rpc.BlockNumber (#2016) --- accounts/abi/bind/backends/simulated.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accounts/abi/bind/backends/simulated.go b/accounts/abi/bind/backends/simulated.go index b7a7756066..728ea28b84 100644 --- a/accounts/abi/bind/backends/simulated.go +++ b/accounts/abi/bind/backends/simulated.go @@ -830,11 +830,11 @@ func (b *SimulatedBackend) FilterLogs(ctx context.Context, query ethereum.Filter filter = b.filterSystem.NewBlockFilter(*query.BlockHash, query.Addresses, query.Topics) } else { // Initialize unset filter boundaried to run from genesis to chain head - from := int64(0) + from := rpc.EarliestBlockNumber.Int64() if query.FromBlock != nil { from = query.FromBlock.Int64() } - to := int64(-1) + to := rpc.LatestBlockNumber.Int64() if query.ToBlock != nil { to = query.ToBlock.Int64() }