From b303af10156402521a0c78b9ffb482fd41ed950a Mon Sep 17 00:00:00 2001 From: Will Winder Date: Thu, 10 Mar 2022 12:50:47 -0500 Subject: [PATCH] Fix dev mode by addressing off by one error. (#920) --- fetcher/fetcher.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fetcher/fetcher.go b/fetcher/fetcher.go index b7da57690..d1e2c7a0d 100644 --- a/fetcher/fetcher.go +++ b/fetcher/fetcher.go @@ -147,7 +147,8 @@ func (bot *fetcherImpl) followLoop(ctx context.Context) error { aclient := bot.Algod() for { for retries := 0; retries < 3; retries++ { - _, err = aclient.StatusAfterBlock(bot.nextRound).Do(ctx) + // nextRound - 1 because the endpoint waits until "StatusAfterBlock" + _, err = aclient.StatusAfterBlock(bot.nextRound - 1).Do(ctx) if err != nil { // If context has expired. if ctx.Err() != nil {