summaryrefslogtreecommitdiff
path: root/catchup/service.go
diff options
context:
space:
mode:
Diffstat (limited to 'catchup/service.go')
-rw-r--r--catchup/service.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/catchup/service.go b/catchup/service.go
index 4005316d5..f022a3dcc 100644
--- a/catchup/service.go
+++ b/catchup/service.go
@@ -345,6 +345,12 @@ func (s *Service) fetchAndWrite(r basics.Round, prevFetchCompleteChan chan bool,
// if the context expired, just exit.
return false
}
+ if errNSBE, ok := err.(ledgercore.ErrNonSequentialBlockEval); ok && errNSBE.EvaluatorRound <= errNSBE.LatestRound {
+ // the block was added to the ledger from elsewhere after fetching it here
+ // only the agreement could have added this block into the ledger, catchup is complete
+ s.log.Infof("fetchAndWrite(%d): after fetching the block, it is already in the ledger. The catchup is complete", r)
+ return false
+ }
s.log.Warnf("fetchAndWrite(%d): failed to validate block : %v", r, err)
return false
}