NodeInfo retrieves all the information we know about the host node at the protocol granularity.
()
| 241 | // NodeInfo retrieves all the information we know about the host node at the |
| 242 | // protocol granularity. |
| 243 | func (api *PublicAdminAPI) NodeInfo() (*p2p.NodeInfo, error) { |
| 244 | server := api.node.Server() |
| 245 | if server == nil { |
| 246 | return nil, ErrNodeStopped |
| 247 | } |
| 248 | return server.NodeInfo(), nil |
| 249 | } |
| 250 | |
| 251 | // Datadir retrieves the current data directory the node is using. |
| 252 | func (api *PublicAdminAPI) Datadir() string { |