From d27a802e1573e1ebd6310ad667f4b8704be4cece Mon Sep 17 00:00:00 2001
From: Silas Davis <silas@erisindustries.com>
Date: Wed, 6 Jul 2016 15:31:25 +0100
Subject: [PATCH] Get defer in the right place

---
 core/config.go                     | 2 +-
 rpc/tendermint/test/common_test.go | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/core/config.go b/core/config.go
index ce8996f7..8a39f920 100644
--- a/core/config.go
+++ b/core/config.go
@@ -54,7 +54,7 @@ func loadModuleConfigFromDo(do *definitions.Do, module string) (*config.ModuleCo
 func LoadModuleConfig(conf *viper.Viper, rootWorkDir, rootDataDir,
 	genesisFile, chainId, module string) (*config.ModuleConfig, error) {
 	moduleName := conf.GetString("chain." + module + ".name")
-	fmt.Println(moduleName)
+	fmt.Println(conf)
 	majorVersion := conf.GetInt("chain." + module + ".major_version")
 	minorVersion := conf.GetInt("chain." + module + ".minor_version")
 	minorVersionString := version.MakeMinorVersionString(moduleName, majorVersion,
diff --git a/rpc/tendermint/test/common_test.go b/rpc/tendermint/test/common_test.go
index 6ff7ae9f..bc0ca59b 100644
--- a/rpc/tendermint/test/common_test.go
+++ b/rpc/tendermint/test/common_test.go
@@ -9,6 +9,7 @@ import (
 // Needs to be in a _test.go file to be picked up
 func TestMain(m *testing.M) {
 	ffs := fixtures.NewFileFixtures()
+	defer ffs.RemoveAll()
 
 	initGlobalVariables(ffs)
 
@@ -16,17 +17,16 @@ func TestMain(m *testing.M) {
 		panic(ffs.Error)
 	}
 
-	defer ffs.RemoveAll()
-
 	saveNewPriv()
 
+	// start a node
+
 	ready := make(chan struct{})
 	go newNode(ready)
 	<-ready
 
 	returnValue := m.Run()
 
-	// start a node
 
 	os.Exit(returnValue)
 }
-- 
GitLab