@@ -111,7 +111,7 @@ func TestHandlePreprepare(t *testing.T) {
111111 false ,
112112 },
113113 {
114- // ErrInvalidMessage
114+ // errOldMessage
115115 func () * testSystem {
116116 sys := NewTestSystemWithBackend (N , F )
117117
@@ -130,26 +130,6 @@ func TestHandlePreprepare(t *testing.T) {
130130 errOldMessage ,
131131 false ,
132132 },
133- {
134- // ErrInvalidMessage
135- func () * testSystem {
136- sys := NewTestSystemWithBackend (N , F )
137-
138- for i , backend := range sys .backends {
139- c := backend .engine .(* core )
140- c .valSet = backend .peers
141- if i != 0 {
142- c .state = StatePreprepared
143- c .current .SetSequence (big .NewInt (10 ))
144- c .current .SetRound (big .NewInt (10 ))
145- }
146- }
147- return sys
148- }(),
149- makeBlock (5 ), //only height 5 will retrun true on backend.HasBlock, see testSystemBackend.HashBlock
150- nil ,
151- true ,
152- },
153133 }
154134
155135OUTER:
@@ -293,8 +273,8 @@ func TestHandlePreprepareWithLock(t *testing.T) {
293273 t .Errorf ("error mismatch: have %v, want nil" , err )
294274 }
295275 if test .proposal == test .lockProposal {
296- if c .state != StatePrepared {
297- t .Errorf ("state mismatch: have %v, want %v" , c .state , StatePrepared )
276+ if c .state != StatePreprepared {
277+ t .Errorf ("state mismatch: have %v, want %v" , c .state , StatePreprepared )
298278 }
299279 if ! reflect .DeepEqual (curView , c .currentView ()) {
300280 t .Errorf ("view mismatch: have %v, want %v" , c .currentView (), curView )
0 commit comments