diff --git a/bzzeth/bzzeth_test.go b/bzzeth/bzzeth_test.go index 3021a51aa4..92280432ea 100644 --- a/bzzeth/bzzeth_test.go +++ b/bzzeth/bzzeth_test.go @@ -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 }