simPrecommitPhase() simulates the PRECOMMIT phase of the BFT lifecycle
(t *testing.T, round uint64)
| 168 | |
| 169 | // simPrecommitPhase() simulates the PRECOMMIT phase of the BFT lifecycle |
| 170 | func (tc *testConsensus) simPrecommitPhase(t *testing.T, round uint64) (block []byte, results *lib.CertificateResult) { |
| 171 | // generate a justification for leading the PRECOMMIT phase |
| 172 | justifyPrecommit, _, _ := tc.simProposeVotePhase(t, true, true, round) |
| 173 | // simulate leading the PRECOMMIT phase |
| 174 | return tc.simLead(t, justifyPrecommit, round, Precommit, func(m *Message) {}) |
| 175 | } |
| 176 | |
| 177 | // simPrecommitVote() simulates the PRECOMMIT-VOTE phase of the BFT lifecycle |
| 178 | func (tc *testConsensus) simPrecommitVotePhase(t *testing.T, proposerIdx int, round ...uint64) (crypto.MultiPublicKeyI, []byte, []byte) { |
no test coverage detected