|
|
@ -25,7 +25,6 @@ func initTMRoot(rootDir string) { |
|
|
|
EnsureDir(rootDir) |
|
|
|
|
|
|
|
configFilePath := path.Join(rootDir, "config.toml") |
|
|
|
genesisFilePath := path.Join(rootDir, "genesis.json") |
|
|
|
|
|
|
|
// Write default config file if missing.
|
|
|
|
if !FileExists(configFilePath) { |
|
|
@ -33,9 +32,6 @@ func initTMRoot(rootDir string) { |
|
|
|
// moniker := cfg.Prompt("Type hostname: ", "anonymous")
|
|
|
|
MustWriteFile(configFilePath, []byte(defaultConfig("anonymous"))) |
|
|
|
} |
|
|
|
if !FileExists(genesisFilePath) { |
|
|
|
MustWriteFile(genesisFilePath, []byte(defaultGenesis)) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
func GetConfig(rootDir string) cfg.Config { |
|
|
@ -88,7 +84,7 @@ var defaultConfigTmpl = `# This is a TOML config file. |
|
|
|
|
|
|
|
moniker = "__MONIKER__" |
|
|
|
node_laddr = "0.0.0.0:46656" |
|
|
|
seeds = "goldenalchemist.chaintest.net:46656" |
|
|
|
seeds = "" |
|
|
|
fast_sync = true |
|
|
|
db_backend = "leveldb" |
|
|
|
log_level = "notice" |
|
|
@ -99,79 +95,3 @@ func defaultConfig(moniker string) (defaultConfig string) { |
|
|
|
defaultConfig = strings.Replace(defaultConfigTmpl, "__MONIKER__", moniker, -1) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
var defaultGenesis = `{ |
|
|
|
"chain_id": "tendermint_testnet_11.c", |
|
|
|
"accounts": [ |
|
|
|
{ |
|
|
|
"address": "9FCBA7F840A0BFEBBE755E853C9947270A912D04", |
|
|
|
"amount": 1991999998000000 |
|
|
|
}, |
|
|
|
{ |
|
|
|
"address": "964B1493BBE3312278B7DEB94C39149F7899A345", |
|
|
|
"amount": 100000000000000 |
|
|
|
}, |
|
|
|
{ |
|
|
|
"address": "B9FA4AB462B9C6BF6A62DB4AE77C9E7087209A04", |
|
|
|
"amount": 1000000000000 |
|
|
|
}, |
|
|
|
{ |
|
|
|
"address": "F171824590D69386F709E7B6704B369C5A370D60", |
|
|
|
"amount": 1000000000000 |
|
|
|
}, |
|
|
|
{ |
|
|
|
"address": "56EFE746A13D9A6054AC89C3E2A361C2DB8B9EAE", |
|
|
|
"amount": 1000000000000 |
|
|
|
}, |
|
|
|
{ |
|
|
|
"address": "7C2E032D8407EDF66A04D88CF0E1D9B15D98AE2D", |
|
|
|
"amount": 1000000000000 |
|
|
|
}, |
|
|
|
{ |
|
|
|
"address": "636EF5823E082AD66EBC203FD4DFB1031F0C61CA", |
|
|
|
"amount": 1000000000000 |
|
|
|
}, |
|
|
|
{ |
|
|
|
"address": "9008419E6351360A59B124E707E4CA2A5BFB9BE6", |
|
|
|
"amount": 1000000000000 |
|
|
|
}, |
|
|
|
{ |
|
|
|
"address": "C78F48919B8A4030AD3E5ED643F8D2302E41953D", |
|
|
|
"amount": 1000000000000 |
|
|
|
}, |
|
|
|
{ |
|
|
|
"address": "5290AC90CE2422DDC3F91F6A246F7E3C542EA51A", |
|
|
|
"amount": 1000000000000 |
|
|
|
}, |
|
|
|
{ |
|
|
|
"address": "A88A61069B6660F30F65E8786AFDD4F1D8F625E9", |
|
|
|
"amount": 1000000 |
|
|
|
}, |
|
|
|
{ |
|
|
|
"address": "EE2EE9247973B4AFC3867CFE5F415410AC251B61", |
|
|
|
"amount": 1000000 |
|
|
|
} |
|
|
|
], |
|
|
|
"validators": [ |
|
|
|
{ |
|
|
|
"pub_key": [1, "178EC6008A4364508979C70CBF100BD4BCBAA12DDE6251F5F486B4FD09014F06"], |
|
|
|
"amount": 100000000000 |
|
|
|
}, |
|
|
|
{ |
|
|
|
"pub_key": [1, "2A77777CC51467DE42350D4A8F34720D527734189BE64C7A930DD169E1FED3C6"], |
|
|
|
"amount": 100000000000 |
|
|
|
}, |
|
|
|
{ |
|
|
|
"pub_key": [1, "3718E69D09B11B3AD3FA31AEF07EC416D2AEED241CACE7B0F30AE9803FFB0F08"], |
|
|
|
"amount": 100000000000 |
|
|
|
}, |
|
|
|
{ |
|
|
|
"pub_key": [1, "C6B0440DEACD1E4CF1C736CEB8E38E788B700BA2B2045A55CB657A455CF5F889"], |
|
|
|
"amount": 100000000000 |
|
|
|
}, |
|
|
|
{ |
|
|
|
"pub_key": [1, "3BA1190D54F91EFBF8B0125F7EC116AD4BA2894B6EE38564A5D5FD3230D91F7B"], |
|
|
|
"amount": 100000000000 |
|
|
|
} |
|
|
|
] |
|
|
|
}` |