mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 10:50:44 +00:00
parent
30e0bfe71e
commit
217a01e927
1 changed files with 2 additions and 2 deletions
|
|
@ -118,7 +118,7 @@ func TestNodeKeyPersistency(t *testing.T) {
|
||||||
}
|
}
|
||||||
config := &Config{Name: "unit-test", DataDir: dir, P2P: p2p.Config{PrivateKey: key}}
|
config := &Config{Name: "unit-test", DataDir: dir, P2P: p2p.Config{PrivateKey: key}}
|
||||||
config.NodeKey()
|
config.NodeKey()
|
||||||
if _, err := os.Stat(filepath.Join(keyfile)); err == nil {
|
if _, err := os.Stat(keyfile); err == nil {
|
||||||
t.Fatalf("one-shot node key persisted to data directory")
|
t.Fatalf("one-shot node key persisted to data directory")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -139,7 +139,7 @@ func TestNodeKeyPersistency(t *testing.T) {
|
||||||
// Configure a new node and ensure the previously persisted key is loaded
|
// Configure a new node and ensure the previously persisted key is loaded
|
||||||
config = &Config{Name: "unit-test", DataDir: dir}
|
config = &Config{Name: "unit-test", DataDir: dir}
|
||||||
config.NodeKey()
|
config.NodeKey()
|
||||||
blob2, err := os.ReadFile(filepath.Join(keyfile))
|
blob2, err := os.ReadFile(keyfile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("failed to read previously persisted node key: %v", err)
|
t.Fatalf("failed to read previously persisted node key: %v", err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue