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

remove code that will not be executed #2333

Merged
merged 3 commits into from
Apr 3, 2024
Merged
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
3 changes: 0 additions & 3 deletions accounts/keystore/account_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,6 @@ func TestUpdatedKeyfileContents(t *testing.T) {
// Now replace file contents
if err := forceCopyFile(file, cachetestAccounts[1].URL.Path); err != nil {
t.Fatal(err)
return
}
wantAccounts = []accounts.Account{cachetestAccounts[1]}
wantAccounts[0].URL = accounts.URL{Scheme: KeyStoreScheme, Path: file}
Expand All @@ -374,7 +373,6 @@ func TestUpdatedKeyfileContents(t *testing.T) {
// Now replace file contents again
if err := forceCopyFile(file, cachetestAccounts[2].URL.Path); err != nil {
t.Fatal(err)
return
}
wantAccounts = []accounts.Account{cachetestAccounts[2]}
wantAccounts[0].URL = accounts.URL{Scheme: KeyStoreScheme, Path: file}
Expand All @@ -390,7 +388,6 @@ func TestUpdatedKeyfileContents(t *testing.T) {
// Now replace file contents with crap
if err := os.WriteFile(file, []byte("foo"), 0600); err != nil {
t.Fatal(err)
return
}
if err := waitForAccounts([]accounts.Account{}, ks); err != nil {
t.Errorf("Emptying account file failed")
Expand Down
1 change: 0 additions & 1 deletion consensus/clique/snapshot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,6 @@ func (tt *cliqueTest) run(t *testing.T) {
for j := 0; j < len(batches)-1; j++ {
if k, err := chain.InsertChain(batches[j]); err != nil {
t.Fatalf("failed to import batch %d, block %d: %v", j, k, err)
break
}
}
if _, err = chain.InsertChain(batches[len(batches)-1]); err != tt.failure {
Expand Down
1 change: 0 additions & 1 deletion eth/fetcher/block_fetcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,6 @@ func testInvalidNumberAnnouncement(t *testing.T, light bool) {
continue
case <-time.After(1 * time.Second):
t.Fatal("announce timeout")
return
}
}
}
Expand Down
1 change: 0 additions & 1 deletion eth/filters/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ func benchmarkBloomBits(b *testing.B, sectionSize uint64) {
hash := rawdb.ReadCanonicalHash(db, i)
if header = rawdb.ReadHeader(db, hash, i); header == nil {
b.Fatalf("Error creating bloomBits data")
return
}
bc.AddBloom(uint(i-sectionIdx*sectionSize), header.Bloom)
}
Expand Down
2 changes: 0 additions & 2 deletions p2p/discover/v5_udp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -822,12 +822,10 @@ func (test *udpV5Test) waitPacketOut(validate interface{}) (closed bool) {
}
if err == errTimeout {
test.t.Fatalf("timed out waiting for %v", exptype)
return false
}
ln := test.nodesByIP[string(dgram.to.IP)]
if ln == nil {
test.t.Fatalf("attempt to send to non-existing node %v", &dgram.to)
return false
}
codec := &testCodec{test: test, id: ln.ID()}
frame, p, err := codec.decodeFrame(dgram.data)
Expand Down
2 changes: 0 additions & 2 deletions tests/state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,9 @@ func runBenchmarkFile(b *testing.B, path string) {
m := make(map[string]StateTest)
if err := readJSONFile(path, &m); err != nil {
b.Fatal(err)
return
}
if len(m) != 1 {
b.Fatal("expected single benchmark in a file")
return
}
for _, t := range m {
t := t
Expand Down
Loading