P2PServer: sanity check message id

This commit is contained in:
SChernykh
2023-07-04 16:47:14 +02:00
parent d6cb0ee8a0
commit 8d9f16c387
2 changed files with 19 additions and 11 deletions
+11 -10
View File
@@ -45,16 +45,17 @@ class P2PServer : public TCPServer
{
public:
enum class MessageId {
HANDSHAKE_CHALLENGE = 0,
HANDSHAKE_SOLUTION = 1,
LISTEN_PORT = 2,
BLOCK_REQUEST = 3,
BLOCK_RESPONSE = 4,
BLOCK_BROADCAST = 5,
PEER_LIST_REQUEST = 6,
PEER_LIST_RESPONSE = 7,
BLOCK_BROADCAST_COMPACT = 8,
BLOCK_NOTIFY = 9,
HANDSHAKE_CHALLENGE,
HANDSHAKE_SOLUTION,
LISTEN_PORT,
BLOCK_REQUEST,
BLOCK_RESPONSE,
BLOCK_BROADCAST,
PEER_LIST_REQUEST,
PEER_LIST_RESPONSE,
BLOCK_BROADCAST_COMPACT,
BLOCK_NOTIFY,
LAST = BLOCK_NOTIFY,
};
explicit P2PServer(p2pool *pool);