integration: check that snapshots are nil #3906

This commit is contained in:
Alex Sharov 2022-04-17 09:54:00 +07:00 committed by GitHub
parent f2a9763a6d
commit 768e1204f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,7 +103,7 @@ func SpawnRecoverSendersStage(cfg SendersCfg, s *StageState, u Unwinder, tx kv.R
defer canonicalC.Close()
startFrom := s.BlockNumber + 1
if cfg.blockRetire.Snapshots() != nil && startFrom < cfg.blockRetire.Snapshots().BlocksAvailable() {
if cfg.blockRetire != nil && cfg.blockRetire.Snapshots() != nil && startFrom < cfg.blockRetire.Snapshots().BlocksAvailable() {
startFrom = cfg.blockRetire.Snapshots().BlocksAvailable()
}