@@ -163,14 +163,12 @@ func TestSealStopChannel(t *testing.T) {
163163 stop := make (chan struct {}, 1 )
164164 eventSub := engine .EventMux ().Subscribe (istanbul.RequestEvent {})
165165 eventLoop := func () {
166- select {
167- case ev := <- eventSub .Chan ():
168- _ , ok := ev .Data .(istanbul.RequestEvent )
169- if ! ok {
170- t .Errorf ("unexpected event comes: %v" , reflect .TypeOf (ev .Data ))
171- }
172- stop <- struct {}{}
166+ ev := <- eventSub .Chan ()
167+ _ , ok := ev .Data .(istanbul.RequestEvent )
168+ if ! ok {
169+ t .Errorf ("unexpected event comes: %v" , reflect .TypeOf (ev .Data ))
173170 }
171+ stop <- struct {}{}
174172 eventSub .Unsubscribe ()
175173 }
176174 go eventLoop ()
@@ -189,14 +187,12 @@ func TestSealCommittedOtherHash(t *testing.T) {
189187 otherBlock := makeBlockWithoutSeal (chain , engine , block )
190188 eventSub := engine .EventMux ().Subscribe (istanbul.RequestEvent {})
191189 eventLoop := func () {
192- select {
193- case ev := <- eventSub .Chan ():
194- _ , ok := ev .Data .(istanbul.RequestEvent )
195- if ! ok {
196- t .Errorf ("unexpected event comes: %v" , reflect .TypeOf (ev .Data ))
197- }
198- engine .Commit (otherBlock , [][]byte {})
190+ ev := <- eventSub .Chan ()
191+ _ , ok := ev .Data .(istanbul.RequestEvent )
192+ if ! ok {
193+ t .Errorf ("unexpected event comes: %v" , reflect .TypeOf (ev .Data ))
199194 }
195+ engine .Commit (otherBlock , [][]byte {})
200196 eventSub .Unsubscribe ()
201197 }
202198 go eventLoop ()
@@ -208,10 +204,8 @@ func TestSealCommittedOtherHash(t *testing.T) {
208204
209205 const timeoutDura = 2 * time .Second
210206 timeout := time .NewTimer (timeoutDura )
211- select {
212- case <- timeout .C :
213- // wait 2 seconds to ensure we cannot get any blocks from Istanbul
214- }
207+ <- timeout .C
208+ // wait 2 seconds to ensure we cannot get any blocks from Istanbul
215209}
216210
217211func TestSealCommitted (t * testing.T ) {
0 commit comments