some public convenience functions, extra debug errors on ExecTx

This commit is contained in:
Ethan Buchman
2015-03-19 02:08:07 -07:00
parent 55d8e29e32
commit deff645dba
5 changed files with 51 additions and 17 deletions

View File

@ -25,6 +25,12 @@ func App() *confer.Config {
return app
}
func SetApp(a *confer.Config) {
appMtx.Lock()
defer appMtx.Unlock()
app = a
}
// NOTE: If you change this, maybe also change initDefaults()
var defaultConfig = `# This is a TOML config file.
# For more information, see https://github.com/toml-lang/toml
@ -57,7 +63,7 @@ ListenAddr = "127.0.0.1:8081"
# TODO: Document options
`
var defaultGenesis = `
var DefaultGenesis = `
{
"Accounts": [
{
@ -114,7 +120,7 @@ func Init(rootDir string) {
// Write default config file if missing.
checkWriteFile(configFile, defaultConfig)
checkWriteFile(genesisFile, defaultGenesis)
checkWriteFile(genesisFile, DefaultGenesis)
// Initialize Config
app = confer.NewConfig()