Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix minor unreachable code #1475

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions cmd/geth/les_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,8 @@ func (g *gethrpc) waitSynced() {
g.geth.Log("Other 'syncing' event", ev)
case err := <-sub.Err():
g.geth.Fatalf("%v notification: %v", g.name, err)
break
case <-timeout:
g.geth.Fatalf("%v timeout syncing", g.name)
break
}
}

Expand Down
9 changes: 3 additions & 6 deletions node/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ func TestDatadirCreation(t *testing.T) {
node, err = New(&Config{DataDir: dir})
if err == nil {
t.Fatalf("protocol stack created with an invalid datadir")
if err := node.Close(); err != nil {
t.Fatalf("failed to close node: %v", err)
}
}
if err := node.Close(); err != nil {
t.Fatalf("failed to close node: %v", err)
}
}

Expand Down Expand Up @@ -212,7 +212,6 @@ func TestConfig_ResolvePluginBaseDir_whenBaseDirExists(t *testing.T) {
}

// Quorum
//
func TestConfig_IsPermissionEnabled_whenTypical(t *testing.T) {
tmpdir, err := ioutil.TempDir("", "q-")
if err != nil {
Expand All @@ -233,7 +232,6 @@ func TestConfig_IsPermissionEnabled_whenTypical(t *testing.T) {
}

// Quorum
//
func TestConfig_IsPermissionEnabled_whenPermissionedFlagIsFalse(t *testing.T) {
testObject := &Config{
EnableNodePermission: false,
Expand All @@ -243,7 +241,6 @@ func TestConfig_IsPermissionEnabled_whenPermissionedFlagIsFalse(t *testing.T) {
}

// Quorum
//
func TestConfig_IsPermissionEnabled_whenPermissionConfigIsNotAvailable(t *testing.T) {
testObject := &Config{
EnableNodePermission: true,
Expand Down
1 change: 0 additions & 1 deletion p2p/netutil/error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ func TestIsPacketTooBig(t *testing.T) {
for i := range buf {
if buf[i] != byte(i) {
t.Fatalf("error in pattern")
break
}
}
}
Expand Down