Skip to content

Commit

Permalink
dbft: do not send PrepareRequest immediately after Recovery message
Browse files Browse the repository at this point in the history
We have timer, and we should follow it. Close #74.

Signed-off-by: Anna Shaleva <anna@nspcc.ru>
  • Loading branch information
AnnaShaleva committed Apr 21, 2023
1 parent 0108387 commit 5a6d1e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dbft.go
Original file line number Diff line number Diff line change
Expand Up @@ -593,9 +593,9 @@ func (d *DBFT) onRecoveryMessage(msg payload.ConsensusPayload) {
if prepReq != nil {
totalPrepReq, validPrepReq = 1, 1
d.OnReceive(prepReq)
} else if d.IsPrimary() {
d.sendPrepareRequest()
}
// If the node is primary, then wait until timer fires to send PrepareRequest
// to avoid rush in blocks submission, #74.
}

for _, m := range recovery.GetPrepareResponses(msg, d.Validators) {
Expand Down

0 comments on commit 5a6d1e5

Please sign in to comment.