fast_sync = true
db_backend = "leveldb"
log_level = "state:info,*:info"
+api_addr = "0.0.0.0:1999"
[rpc]
laddr = "tcp://0.0.0.0:46657"
/****** these are for test settings ***********/
func ResetTestRoot(testName string) *Config {
- rootDir := os.ExpandEnv("$HOME/.tendermint_test")
+ rootDir := os.ExpandEnv("$HOME/.test")
rootDir = filepath.Join(rootDir, testName)
- // Remove ~/.tendermint_test_bak
if cmn.FileExists(rootDir + "_bak") {
err := os.RemoveAll(rootDir + "_bak")
if err != nil {
cmn.PanicSanity(err.Error())
}
}
- // Move ~/.tendermint_test to ~/.tendermint_test_bak
if cmn.FileExists(rootDir) {
err := os.Rename(rootDir, rootDir+"_bak")
if err != nil {
fast_sync = false
db_backend = "memdb"
log_level = "info"
+api_addr = "0.0.0.0:1999"
[rpc]
laddr = "tcp://0.0.0.0:36657"
var (
// config vars
rootCAs = env.String("ROOT_CA_CERTS", "") // file path
- listenAddr = env.String("LISTEN", ":1999")
splunkAddr = os.Getenv("SPLUNKADDR")
logFile = os.Getenv("LOGFILE")
logSize = env.Int("LOGSIZE", 5e6) // 5MB
wh.h.ServeHTTP(w, req)
}
-func rpcInit(h *bc.BlockchainReactor) {
+func rpcInit(h *bc.BlockchainReactor, config *cfg.Config) {
// The waitHandler accepts incoming requests, but blocks until its underlying
// handler is set, when the second phase is complete.
var coreHandler waitHandler
// https://github.com/golang/go/issues/17071
TLSNextProto: map[string]func(*http.Server, *tls.Conn, http.Handler){},
}
+ listenAddr := env.String("LISTEN", config.ApiAddress)
listener, _ := net.Listen("tcp", *listenAddr)
// The `Serve` call has to happen in its own goroutine because
bcReactor.SetLogger(logger.With("module", "blockchain"))
sw.AddReactor("BLOCKCHAIN", bcReactor)
- rpcInit(bcReactor)
+ rpcInit(bcReactor, config)
// Optionally, start the pex reactor
var addrBook *p2p.AddrBook
if config.P2P.PexReactor {