Browse Source

default empty seeds. some node methods

pull/213/merge
Ethan Buchman 9 years ago
parent
commit
b2e612fb79
2 changed files with 10 additions and 1 deletions
  1. +1
    -0
      config/tendermint/config.go
  2. +9
    -1
      node/node.go

+ 1
- 0
config/tendermint/config.go View File

@ -55,6 +55,7 @@ func GetConfig(rootDir string) cfg.Config {
mapConfig.SetDefault("proxy_app", "tcp://127.0.0.1:46658")
mapConfig.SetDefault("moniker", "anonymous")
mapConfig.SetDefault("node_laddr", "0.0.0.0:46656")
mapConfig.SetDefault("seeds", "")
// mapConfig.SetDefault("seeds", "goldenalchemist.chaintest.net:46656")
mapConfig.SetDefault("fast_sync", true)
mapConfig.SetDefault("skip_upnp", false)


+ 9
- 1
node/node.go View File

@ -212,6 +212,10 @@ func (n *Node) ConsensusState() *consensus.ConsensusState {
return n.consensusState
}
func (n *Node) ConsensusReactor() *consensus.ConsensusReactor {
return n.consensusReactor
}
func (n *Node) MempoolReactor() *mempl.MempoolReactor {
return n.mempoolReactor
}
@ -220,6 +224,11 @@ func (n *Node) EventSwitch() *events.EventSwitch {
return n.evsw
}
// XXX: for convenience
func (n *Node) PrivValidator() *types.PrivValidator {
return n.privValidator
}
func makeNodeInfo(config cfg.Config, sw *p2p.Switch, privKey crypto.PrivKeyEd25519) *p2p.NodeInfo {
nodeInfo := &p2p.NodeInfo{
@ -326,7 +335,6 @@ func RunNode(config cfg.Config) {
PanicSanity(Fmt("Genesis doc %v must include non-empty chain_id", genDocFile))
}
config.Set("chain_id", genDoc.ChainID)
config.Set("genesis_doc", genDoc)
}
}


Loading…
Cancel
Save