mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
Signed-off-by: sellskin <mydesk@yeah.net>
all: remove code that will not be executed Signed-off-by: sellskin <mydesk@yeah.net>
This commit is contained in:
parent
ae47004487
commit
5af0f43745
5 changed files with 0 additions and 9 deletions
|
|
@ -358,7 +358,6 @@ func TestUpdatedKeyfileContents(t *testing.T) {
|
||||||
// Now replace file contents
|
// Now replace file contents
|
||||||
if err := forceCopyFile(file, cachetestAccounts[1].URL.Path); err != nil {
|
if err := forceCopyFile(file, cachetestAccounts[1].URL.Path); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
wantAccounts = []accounts.Account{cachetestAccounts[1]}
|
wantAccounts = []accounts.Account{cachetestAccounts[1]}
|
||||||
wantAccounts[0].URL = accounts.URL{Scheme: KeyStoreScheme, Path: file}
|
wantAccounts[0].URL = accounts.URL{Scheme: KeyStoreScheme, Path: file}
|
||||||
|
|
@ -374,7 +373,6 @@ func TestUpdatedKeyfileContents(t *testing.T) {
|
||||||
// Now replace file contents again
|
// Now replace file contents again
|
||||||
if err := forceCopyFile(file, cachetestAccounts[2].URL.Path); err != nil {
|
if err := forceCopyFile(file, cachetestAccounts[2].URL.Path); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
wantAccounts = []accounts.Account{cachetestAccounts[2]}
|
wantAccounts = []accounts.Account{cachetestAccounts[2]}
|
||||||
wantAccounts[0].URL = accounts.URL{Scheme: KeyStoreScheme, Path: file}
|
wantAccounts[0].URL = accounts.URL{Scheme: KeyStoreScheme, Path: file}
|
||||||
|
|
@ -390,7 +388,6 @@ func TestUpdatedKeyfileContents(t *testing.T) {
|
||||||
// Now replace file contents with crap
|
// Now replace file contents with crap
|
||||||
if err := os.WriteFile(file, []byte("foo"), 0600); err != nil {
|
if err := os.WriteFile(file, []byte("foo"), 0600); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
if err := waitForAccounts([]accounts.Account{}, ks); err != nil {
|
if err := waitForAccounts([]accounts.Account{}, ks); err != nil {
|
||||||
t.Errorf("Emptying account file failed")
|
t.Errorf("Emptying account file failed")
|
||||||
|
|
|
||||||
|
|
@ -467,7 +467,6 @@ func (tt *cliqueTest) run(t *testing.T) {
|
||||||
for j := 0; j < len(batches)-1; j++ {
|
for j := 0; j < len(batches)-1; j++ {
|
||||||
if k, err := chain.InsertChain(batches[j]); err != nil {
|
if k, err := chain.InsertChain(batches[j]); err != nil {
|
||||||
t.Fatalf("failed to import batch %d, block %d: %v", j, k, err)
|
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 {
|
if _, err = chain.InsertChain(batches[len(batches)-1]); err != tt.failure {
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,6 @@ func benchmarkBloomBits(b *testing.B, sectionSize uint64) {
|
||||||
hash := rawdb.ReadCanonicalHash(db, i)
|
hash := rawdb.ReadCanonicalHash(db, i)
|
||||||
if header = rawdb.ReadHeader(db, hash, i); header == nil {
|
if header = rawdb.ReadHeader(db, hash, i); header == nil {
|
||||||
b.Fatalf("Error creating bloomBits data")
|
b.Fatalf("Error creating bloomBits data")
|
||||||
return
|
|
||||||
}
|
}
|
||||||
bc.AddBloom(uint(i-sectionIdx*sectionSize), header.Bloom)
|
bc.AddBloom(uint(i-sectionIdx*sectionSize), header.Bloom)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -822,12 +822,10 @@ func (test *udpV5Test) waitPacketOut(validate interface{}) (closed bool) {
|
||||||
}
|
}
|
||||||
if err == errTimeout {
|
if err == errTimeout {
|
||||||
test.t.Fatalf("timed out waiting for %v", exptype)
|
test.t.Fatalf("timed out waiting for %v", exptype)
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
ln := test.nodesByIP[string(dgram.to.IP)]
|
ln := test.nodesByIP[string(dgram.to.IP)]
|
||||||
if ln == nil {
|
if ln == nil {
|
||||||
test.t.Fatalf("attempt to send to non-existing node %v", &dgram.to)
|
test.t.Fatalf("attempt to send to non-existing node %v", &dgram.to)
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
codec := &testCodec{test: test, id: ln.ID()}
|
codec := &testCodec{test: test, id: ln.ID()}
|
||||||
frame, p, err := codec.decodeFrame(dgram.data)
|
frame, p, err := codec.decodeFrame(dgram.data)
|
||||||
|
|
|
||||||
|
|
@ -232,11 +232,9 @@ func runBenchmarkFile(b *testing.B, path string) {
|
||||||
m := make(map[string]StateTest)
|
m := make(map[string]StateTest)
|
||||||
if err := readJSONFile(path, &m); err != nil {
|
if err := readJSONFile(path, &m); err != nil {
|
||||||
b.Fatal(err)
|
b.Fatal(err)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
if len(m) != 1 {
|
if len(m) != 1 {
|
||||||
b.Fatal("expected single benchmark in a file")
|
b.Fatal("expected single benchmark in a file")
|
||||||
return
|
|
||||||
}
|
}
|
||||||
for _, t := range m {
|
for _, t := range m {
|
||||||
t := t
|
t := t
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue