Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

bzzeth: correct the order of cleanup steps in newTestNetworkStore #1815

Merged
merged 1 commit into from
Sep 25, 2019
Merged
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
9 changes: 4 additions & 5 deletions bzzeth/bzzeth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,14 @@ func newTestNetworkStore(t *testing.T) (prvkey *ecdsa.PrivateKey, netStore *stor
netStore = storage.NewNetStore(localStore, bzzAddr, enode.ID{})

cleanup = func() {
err := os.RemoveAll(dir)
if err != nil {
t.Fatalf("Could not remove localstore dir")
}
err = netStore.Close()
if err != nil {
t.Fatalf("Could not close netStore")
}

err := os.RemoveAll(dir)
if err != nil {
t.Fatalf("Could not remove localstore dir")
}
}
return prvkey, netStore, cleanup
}
Expand Down