Add PeerFinder peer discovery logic and unit test

This commit is contained in:
Vinnie Falco
2013-09-11 11:37:03 -07:00
parent 45eccf2ccf
commit 27f0cae812
11 changed files with 625 additions and 8 deletions

View File

@@ -14,6 +14,7 @@ enum MessageType
mtCONTACT = 11;
mtGET_PEERS = 12;
mtPEERS = 13;
mtANNOUNCE = 14;
// operations for 'small' nodes
mtSEARCH_TRANSACTION = 20;
@@ -228,6 +229,14 @@ message TMPeers
repeated TMIPv4EndPoint nodes = 1;
}
message TMAnnounce
{
required bytes serverID = 1; // The ID of this server
required bool privatePeer = 2; // This peer is private - the announce will not be propagated
required uint32 hopCount = 3; // The hop count of this server
required bytes viaPeerID = 4; // The ID of the peer through which we know this server
repeated TMIPv4EndPoint connectPoints = 5; // Addresses on which this server accepts connections (can be empty)
};
message TMSearchTransaction
{