Skip to content

Commit

Permalink
Fix dev mode by addressing off by one error. (#920)
Browse files Browse the repository at this point in the history
  • Loading branch information
winder authored Mar 10, 2022
1 parent ef46a1a commit b303af1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fetcher/fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit b303af1

Please sign in to comment.