MCPcopy
hub / github.com/canopy-network/canopy / simPrecommitPhase

Method simPrecommitPhase

bft/mock_test.go:170–175  ·  view source on GitHub ↗

simPrecommitPhase() simulates the PRECOMMIT phase of the BFT lifecycle

(t *testing.T, round uint64)

Source from the content-addressed store, hash-verified

168
169// simPrecommitPhase() simulates the PRECOMMIT phase of the BFT lifecycle
170func (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
178func (tc *testConsensus) simPrecommitVotePhase(t *testing.T, proposerIdx int, round ...uint64) (crypto.MultiPublicKeyI, []byte, []byte) {

Callers 4

TestNewRoundFunction · 0.80
TestSafeNodeFunction · 0.80

Calls 2

simProposeVotePhaseMethod · 0.95
simLeadMethod · 0.95

Tested by

no test coverage detected