App -> App()

This commit is contained in:
Matthew Wampler-Doty
2015-03-16 23:16:26 -07:00
committed by Jae Kwon
parent e59de906f7
commit f03547007a
13 changed files with 97 additions and 85 deletions

View File

@ -17,14 +17,14 @@ func StatusHandler(w http.ResponseWriter, r *http.Request) {
LatestBlockHeight uint
LatestBlockTime int64 // nano
Network string
}{genesisHash, latestBlockHash, latestHeight, latestBlockTime, config.App.GetString("Network")})
}{genesisHash, latestBlockHash, latestHeight, latestBlockTime, config.App().GetString("Network")})
}
func NetInfoHandler(w http.ResponseWriter, r *http.Request) {
o, i, _ := p2pSwitch.NumPeers()
numPeers := o + i
listening := p2pSwitch.IsListening()
network := config.App.GetString("Network")
network := config.App().GetString("Network")
WriteAPIResponse(w, API_OK, struct {
NumPeers int
Listening bool