Skip to content

Commit

Permalink
core/priority: don't start consensus twice (#2447)
Browse files Browse the repository at this point in the history
If consensus has been started because enough messages have been received, don't also start it if exchangeTimeout is reached.

category: bug
ticket: #2439
  • Loading branch information
gsora authored Jul 19, 2023
1 parent e1080ba commit f14931a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/priority/prioritiser.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,10 @@ func runInstance(ctx context.Context, duty core.Duty, own *pbv1.PriorityMsg,
case msg := <-responses:
addMsg(msg)
case <-exTimeout:
if consStarted {
continue
}

log.Debug(ctx, "Priority protocol instance exchange timeout, starting consensus")
consStarted = true
err := startConsensus(ctx, duty, msgs, minRequired, consensus)
Expand Down

0 comments on commit f14931a

Please sign in to comment.