log "github.com/sirupsen/logrus"
- "github.com/bytom/crypto/ed25519"
+ "github.com/bytom/bytom/crypto/ed25519"
)
var (
// This should be set in viper so it can unmarshal into this struct
RootDir string `mapstructure:"home"`
+ //The alias of the node
+ NodeAlias string `mapstructure:"node_alias"`
+
//The ID of the network to json
ChainID string `mapstructure:"chain_id"`
DBBackend: "leveldb",
DBPath: "data",
KeysPath: "keystore",
+ NodeAlias: "",
+ LogFile: "log",
}
}
return rootify(b.DBPath, b.RootDir)
}
+func (b BaseConfig) LogDir() string {
+ return rootify(b.LogFile, b.RootDir)
+}
+
func (b BaseConfig) KeysDir() string {
return rootify(b.KeysPath, b.RootDir)
}
PrivateKey string `mapstructure:"node_key"`
NodeKeyFile string `mapstructure:"node_key_file"`
SkipUPNP bool `mapstructure:"skip_upnp"`
+ LANDiscover bool `mapstructure:"lan_discoverable"`
MaxNumPeers int `mapstructure:"max_num_peers"`
HandshakeTimeout int `mapstructure:"handshake_timeout"`
DialTimeout int `mapstructure:"dial_timeout"`
ListenAddress: "tcp://0.0.0.0:46656",
NodeKeyFile: "nodekey",
SkipUPNP: false,
+ LANDiscover: true,
MaxNumPeers: 50,
HandshakeTimeout: 30,
DialTimeout: 3,
type WalletConfig struct {
Disable bool `mapstructure:"disable"`
Rescan bool `mapstructure:"rescan"`
+ TxIndex bool `mapstructure:"txindex"`
MaxTxFee uint64 `mapstructure:"max_tx_fee"`
}
return &WalletConfig{
Disable: false,
Rescan: false,
+ TxIndex: false,
MaxTxFee: uint64(1000000000),
}
}