From 5a6d1e5e3235e91d975bc29961132551174393bc Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Fri, 21 Apr 2023 12:10:55 +0300 Subject: [PATCH] dbft: do not send PrepareRequest immediately after Recovery message We have timer, and we should follow it. Close #74. Signed-off-by: Anna Shaleva --- dbft.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dbft.go b/dbft.go index b9842feb..a5560c9d 100644 --- a/dbft.go +++ b/dbft.go @@ -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) {