saving development state...

This commit is contained in:
Jae Kwon
2014-08-10 16:35:08 -07:00
parent 50544c50af
commit d300a67bb1
46 changed files with 2458 additions and 1058 deletions

View File

@@ -67,8 +67,9 @@ func init() {
/* Default configuration */
var defaultConfig = Config_{
LAddr: "0.0.0.0:0",
Seed: "",
Network: "tendermint_testnet0",
LAddr: "0.0.0.0:0",
Seed: "",
Db: DbConfig{
Type: "level",
Dir: RootDir + "/data",
@@ -79,10 +80,11 @@ var defaultConfig = Config_{
/* Configuration types */
type Config_ struct {
LAddr string
Seed string
Db DbConfig
Twilio TwilioConfig
Network string
LAddr string
Seed string
Db DbConfig
Twilio TwilioConfig
}
type TwilioConfig struct {
@@ -99,6 +101,9 @@ type DbConfig struct {
}
func (cfg *Config_) validate() error {
if cfg.Network == "" {
cfg.Network = defaultConfig.Network
}
if cfg.LAddr == "" {
cfg.LAddr = defaultConfig.LAddr
}