peers propagation working fine, started to implement serverCA

This commit is contained in:
arnaucode
2017-11-26 12:25:28 +01:00
parent d9f2bca34c
commit f56763d48e
30 changed files with 1123 additions and 26 deletions

View File

@@ -0,0 +1,16 @@
package main
import (
"encoding/json"
"io/ioutil"
"net/http"
)
func getPeers() {
res, err := http.Get("http://" + config.IP + ":" + config.ServerRESTPort + "/peers")
check(err)
body, err := ioutil.ReadAll(res.Body)
check(err)
err = json.Unmarshal(body, &peersList)
check(err)
}