New filter DHTSearchStatus for debug purposes.

Various minor improvements and fixes.
New high-level FindNode and AsyncSearch functions.
This commit is contained in:
Kleissner
2021-07-28 01:33:33 +02:00
parent 891e621e8a
commit e5d09e7086
5 changed files with 50 additions and 10 deletions

View File

@@ -69,6 +69,11 @@ func (c *Connection) IsPortForward() bool {
return c.PortExternal > 0
}
// IsVirtual returns true if the peer has not been connected yet. This is the case if another peer responds with peer details, and that peer shall be contacted.
func (peer *PeerInfo) IsVirtual() bool {
return peer.isVirtual
}
// GetConnections returns the list of connections
func (peer *PeerInfo) GetConnections(active bool) (connections []*Connection) {
peer.RLock()