remove Peer.SetVersionAndConnections
further shrinking Peer API
This commit is contained in:
1 parent
86ba3be4f7
commit
426d8edb31
3 files changed
+4
-10
No files matched your search
+2
-2
@@ -270,8 +270,8 @@ func (peers *Peers) applyUpdate(decodedUpdate []*Peer, decodedConns [][]Connecti
|
||||
// for an update would be someone else calling
|
||||
// router.Peers.ApplyUpdate. But ApplyUpdate takes the Lock on
|
||||
// the router.Peers, so there can be no race here.
|
||||
conns := makeConnsMap(peer, connSummaries, peers.table)
|
||||
peer.SetVersionAndConnections(newPeer.version, conns)
|
||||
peer.version = newPeer.version
|
||||
peer.connections = makeConnsMap(peer, connSummaries, peers.table)
|
||||
newUpdate[name] = peer
|
||||
}
|
||||
return newUpdate
|
||||
|
||||
Reference in new issue
Block a user