This commit is contained in:
@@ -136,6 +136,7 @@ func (n *Node) peersHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
var list []Peer
|
var list []Peer
|
||||||
list = append(list, n.self)
|
list = append(list, n.self)
|
||||||
for _, p := range n.peers {
|
for _, p := range n.peers {
|
||||||
|
//p.Self = false
|
||||||
list = append(list, *p)
|
list = append(list, *p)
|
||||||
}
|
}
|
||||||
writeJSON(w, http.StatusOK, list)
|
writeJSON(w, http.StatusOK, list)
|
||||||
@@ -421,6 +422,7 @@ func (n *Node) PeerList() []Peer {
|
|||||||
out = append(out, n.self)
|
out = append(out, n.self)
|
||||||
for _, p := range n.peers {
|
for _, p := range n.peers {
|
||||||
cp := *p
|
cp := *p
|
||||||
|
cp.Self = false
|
||||||
out = append(out, cp)
|
out = append(out, cp)
|
||||||
}
|
}
|
||||||
return out
|
return out
|
||||||
|
|||||||
Reference in New Issue
Block a user