mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-12 12:51:22 +00:00
Merge remote-tracking branch 'origin/config' into develop
This commit is contained in:
14
node/node.go
14
node/node.go
@ -24,6 +24,7 @@ import (
|
||||
sm "github.com/tendermint/tendermint/state"
|
||||
stypes "github.com/tendermint/tendermint/state/types"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
"github.com/tendermint/tendermint/vm"
|
||||
"github.com/tendermint/tendermint/wire"
|
||||
)
|
||||
|
||||
@ -127,6 +128,17 @@ func NewNode() *Node {
|
||||
// they should all satisfy events.Eventable
|
||||
SetFireable(eventSwitch, pexReactor, bcReactor, mempoolReactor, consensusReactor)
|
||||
|
||||
// run the profile server
|
||||
profileHost := config.GetString("prof_laddr")
|
||||
if profileHost != "" {
|
||||
go func() {
|
||||
log.Warn("Profile server", "error", http.ListenAndServe(profileHost, nil))
|
||||
}()
|
||||
}
|
||||
|
||||
// set vm log level
|
||||
vm.SetDebug(config.GetBool("vm_log"))
|
||||
|
||||
return &Node{
|
||||
sw: sw,
|
||||
evsw: eventSwitch,
|
||||
@ -256,7 +268,7 @@ func makeNodeInfo(sw *p2p.Switch, privKey acm.PrivKeyEd25519) *types.NodeInfo {
|
||||
}
|
||||
|
||||
// include git hash in the nodeInfo if available
|
||||
if rev, err := ReadFile(config.GetString("revisions_file")); err == nil {
|
||||
if rev, err := ReadFile(config.GetString("revision_file")); err == nil {
|
||||
nodeInfo.Version.Revision = string(rev)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user