Add NewPeerFromSummary

To reduce the number of places that are explicit about which values
go into a new Peer.
This commit is contained in:
David Wragg committed 2015-06-12 16:12:59 +01:00
1 parent a9c710211b
commit a334059e85
6 files changed
+50 -50

No files matched your search

+1 -1
View File
@@ -57,7 +57,7 @@ func (peers *Peers) MarshalJSON() ([]byte, error) {
connections = append(connections, conn)
}
}
ps = append(ps, &p{peer.Name.String(), peer.NickName, peer.UID, peer.version, connections})
ps = append(ps, &p{peer.Name.String(), peer.NickName, peer.UID, peer.Version, connections})
})
return json.Marshal(ps)
}