pull/4377/head
frozen 2 years ago committed by Casey Gardiner
parent 567c522b35
commit e6e936e347
  1. 6
      consensus/view_change_test.go

@ -43,7 +43,7 @@ func TestPhaseSwitching(t *testing.T) {
_, _, consensus, _, err := GenerateConsensusForTesting()
assert.NoError(t, err)
assert.Equal(t, FBFTAnnounce, consensus.phase.Get()) // It's a new consensus, we should be at the FBFTAnnounce phase.
assert.Equal(t, FBFTAnnounce, consensus.phase) // It's a new consensus, we should be at the FBFTAnnounce phase.
switches := []phaseSwitch{
{start: FBFTAnnounce, end: FBFTPrepare},
@ -73,10 +73,10 @@ func TestPhaseSwitching(t *testing.T) {
func testPhaseGroupSwitching(t *testing.T, consensus *Consensus, phases []FBFTPhase, startPhase FBFTPhase, desiredPhase FBFTPhase) {
for range phases {
consensus.switchPhase("test", desiredPhase)
assert.Equal(t, desiredPhase, consensus.phase.Get())
assert.Equal(t, desiredPhase, consensus.phase)
}
assert.Equal(t, desiredPhase, consensus.phase.Get())
assert.Equal(t, desiredPhase, consensus.phase)
return
}

Loading…
Cancel
Save