NodeInfo not a pointer

This commit is contained in:
Ethan Buchman
2018-01-14 00:10:29 -05:00
parent 08f84cd712
commit 8b74a8d6ac
11 changed files with 33 additions and 43 deletions

View File

@ -537,12 +537,12 @@ func (n *Node) ProxyApp() proxy.AppConns {
return n.proxyApp
}
func (n *Node) makeNodeInfo(pubKey crypto.PubKey) *p2p.NodeInfo {
func (n *Node) makeNodeInfo(pubKey crypto.PubKey) p2p.NodeInfo {
txIndexerStatus := "on"
if _, ok := n.txIndexer.(*null.TxIndex); ok {
txIndexerStatus = "off"
}
nodeInfo := &p2p.NodeInfo{
nodeInfo := p2p.NodeInfo{
PubKey: pubKey,
Network: n.genesisDoc.ChainID,
Version: version.Version,
@ -574,7 +574,7 @@ func (n *Node) makeNodeInfo(pubKey crypto.PubKey) *p2p.NodeInfo {
//------------------------------------------------------------------------------
// NodeInfo returns the Node's Info from the Switch.
func (n *Node) NodeInfo() *p2p.NodeInfo {
func (n *Node) NodeInfo() p2p.NodeInfo {
return n.sw.NodeInfo()
}