Removed peer editing, cleanup
This commit is contained in:
@@ -28,7 +28,6 @@ type PeerInitResp struct {
|
||||
// non-public peer (it is the peer's own bind/beacon port).
|
||||
type Peer struct {
|
||||
PeerIP byte
|
||||
Version int64
|
||||
Name string
|
||||
Addr4 netip.Addr // zero if none
|
||||
Addr6 netip.Addr // zero if none
|
||||
@@ -74,7 +73,6 @@ func (p Peer) PreferredEndpoint() netip.AddrPort {
|
||||
// encoding/json would emit them as arrays of numbers).
|
||||
type peerJSON struct {
|
||||
PeerIP byte
|
||||
Version int64
|
||||
Name string
|
||||
Addr4 netip.Addr
|
||||
Addr6 netip.Addr
|
||||
@@ -87,7 +85,6 @@ type peerJSON struct {
|
||||
func (p Peer) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(peerJSON{
|
||||
PeerIP: p.PeerIP,
|
||||
Version: p.Version,
|
||||
Name: p.Name,
|
||||
Addr4: p.Addr4,
|
||||
Addr6: p.Addr6,
|
||||
@@ -120,7 +117,6 @@ func (p *Peer) UnmarshalJSON(data []byte) error {
|
||||
}
|
||||
*p = Peer{
|
||||
PeerIP: j.PeerIP,
|
||||
Version: j.Version,
|
||||
Name: j.Name,
|
||||
Addr4: j.Addr4,
|
||||
Addr6: j.Addr6,
|
||||
|
||||
Reference in New Issue
Block a user