Skip to content

Commit

Permalink
les: remove invalid use of t.Fatal in TestHandshake (ethereum#21012)
Browse files Browse the repository at this point in the history
  • Loading branch information
BurtonQin authored May 1, 2020
1 parent 7e4d192 commit c43be6c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions les/peer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package les

import (
"crypto/rand"
"errors"
"math/big"
"reflect"
"sort"
Expand Down Expand Up @@ -121,10 +122,10 @@ func TestHandshake(t *testing.T) {
var reqType uint64
err := recv.get("announceType", &reqType)
if err != nil {
t.Fatal(err)
return err
}
if reqType != announceTypeSigned {
t.Fatal("Expected announceTypeSigned")
return errors.New("Expected announceTypeSigned")
}
return nil
})
Expand Down

0 comments on commit c43be6c

Please sign in to comment.