added Moniker as config, available in RPC.

This commit is contained in:
Jae Kwon
2015-04-18 16:43:48 -07:00
parent 5e45a849ab
commit fa669ae436
3 changed files with 5 additions and 0 deletions

View File

@ -33,6 +33,7 @@ func Status() (*ctypes.ResponseStatus, error) {
func NetInfo() (*ctypes.ResponseNetInfo, error) {
listening := p2pSwitch.IsListening()
moniker := config.App().GetString("Moniker")
network := config.App().GetString("Network")
listeners := []string{}
for _, listener := range p2pSwitch.Listeners() {
@ -46,6 +47,7 @@ func NetInfo() (*ctypes.ResponseNetInfo, error) {
})
}
return &ctypes.ResponseNetInfo{
Moniker: moniker,
Network: network,
Listening: listening,
Listeners: listeners,