Skip to content

Commit

Permalink
add peer gossip sleep (celestiaorg#241) (celestiaorg#244)
Browse files Browse the repository at this point in the history
* add peer gossip sleep

* add changelog

* Update .changelog/unreleased/bug-fixes/4-busy-loop-send-block-part.md

Co-authored-by: Jasmina Malicevic <jasmina.dustinac@gmail.com>

* Update .changelog/unreleased/bug-fixes/4-busy-loop-send-block-part.md

---------

Co-authored-by: jhernandezb <contact@jhernandez.me>
Co-authored-by: Jasmina Malicevic <jasmina.dustinac@gmail.com>
(cherry picked from commit 5954e75)

Co-authored-by: Sergio Mena <sergio@informal.systems>
  • Loading branch information
mergify[bot] and sergio-mena committed Jan 31, 2023
1 parent c5cc64e commit a3817ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- `[consensus]` Fixed a busy loop that happened when sending of a block part failed by sleeping in case of error.
([\#4](https://github.com/informalsystems/tendermint/pull/4))
2 changes: 2 additions & 0 deletions consensus/reactor.go
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,8 @@ func (conR *Reactor) gossipDataForCatchup(logger log.Logger, rs *cstypes.RoundSt
ps.SetHasProposalBlockPart(prs.Height, prs.Round, index)
} else {
logger.Debug("Sending block part for catchup failed")
// sleep to avoid retrying too fast
time.Sleep(conR.conS.config.PeerGossipSleepDuration)
}
return
}
Expand Down

0 comments on commit a3817ce

Please sign in to comment.