Skip to content

Commit

Permalink
add peer gossip sleep (#241) (#245)
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 <[email protected]>

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

---------

Co-authored-by: jhernandezb <[email protected]>
Co-authored-by: Jasmina Malicevic <[email protected]>
(cherry picked from commit 5954e75)

Co-authored-by: Sergio Mena <[email protected]>
  • Loading branch information
mergify[bot] and sergio-mena authored Jan 31, 2023
1 parent ce0db1f commit ba7a7f1
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 @@ -706,6 +706,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 ba7a7f1

Please sign in to comment.