From ddb60d00b0e2b1ff2595db02182080e3e26d0d5a Mon Sep 17 00:00:00 2001 From: Loong Date: Mon, 23 Mar 2020 16:50:38 +1100 Subject: [PATCH] process: update comment to be more accurate --- process/process.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/process/process.go b/process/process.go index 8fd0225f..0b63b8b8 100644 --- a/process/process.go +++ b/process/process.go @@ -533,11 +533,13 @@ func (p *Process) checkProposeInCurrentHeightAndRoundWithPrevotes() { } // checkProposeInCurrentHeightAndRoundWithPrevotesForTheFirstTime must only be -// called when a Propose and 2f+1 Prevotes has been seen for the first time at +// called when a Propose or Prevote has been seen for the first time, and it is +// possible that a Propose and 2f+1 Prevotes has been seen for the first time at // the current `block.Height` and `block.Round`. This can happen when a Propose // is seen for the first time at the current `block.Height` and `block.Round`, // or, when a Prevote is seen for the first time at the current `block.Height` -// and `block.Round`. +// and `block.Round`. It is ok to call this function multiple times +// pre-emptively, but this call must only succeed once. func (p *Process) checkProposeInCurrentHeightAndRoundWithPrevotesForTheFirstTime() { // upon Propose{currentHeight, currentRound, block, *} from Schedule(currentHeight, currentRound) m := p.state.Proposals.QueryByHeightRoundSignatory(p.state.CurrentHeight, p.state.CurrentRound, p.scheduler.Schedule(p.state.CurrentHeight, p.state.CurrentRound))