mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-31 04:01:55 +00:00
NodeInfo not a pointer
This commit is contained in:
@@ -41,7 +41,7 @@ func NetInfo() (*ctypes.ResultNetInfo, error) {
|
||||
peers := []ctypes.Peer{}
|
||||
for _, peer := range p2pSwitch.Peers().List() {
|
||||
peers = append(peers, ctypes.Peer{
|
||||
NodeInfo: *peer.NodeInfo(),
|
||||
NodeInfo: peer.NodeInfo(),
|
||||
IsOutbound: peer.IsOutbound(),
|
||||
ConnectionStatus: peer.Status(),
|
||||
})
|
||||
|
@@ -30,7 +30,7 @@ type P2P interface {
|
||||
Listeners() []p2p.Listener
|
||||
Peers() p2p.IPeerSet
|
||||
NumPeers() (outbound, inbound, dialig int)
|
||||
NodeInfo() *p2p.NodeInfo
|
||||
NodeInfo() p2p.NodeInfo
|
||||
IsListening() bool
|
||||
DialPeersAsync(*p2p.AddrBook, []string, bool) error
|
||||
}
|
||||
|
@@ -54,7 +54,7 @@ func NewResultCommit(header *types.Header, commit *types.Commit,
|
||||
}
|
||||
|
||||
type ResultStatus struct {
|
||||
NodeInfo *p2p.NodeInfo `json:"node_info"`
|
||||
NodeInfo p2p.NodeInfo `json:"node_info"`
|
||||
PubKey crypto.PubKey `json:"pub_key"`
|
||||
LatestBlockHash data.Bytes `json:"latest_block_hash"`
|
||||
LatestAppHash data.Bytes `json:"latest_app_hash"`
|
||||
@@ -64,7 +64,7 @@ type ResultStatus struct {
|
||||
}
|
||||
|
||||
func (s *ResultStatus) TxIndexEnabled() bool {
|
||||
if s == nil || s.NodeInfo == nil {
|
||||
if s == nil {
|
||||
return false
|
||||
}
|
||||
for _, s := range s.NodeInfo.Other {
|
||||
|
Reference in New Issue
Block a user