diff --git a/src/main.cpp b/src/main.cpp index ef0fcfbba..20ea1112f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -7672,31 +7672,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, Misbehaving(pfrom->GetId(), nDoS); } } - - } else if (strCommand == NetMsgType::MEMPOOL) { - LOCK2(cs_main, pfrom->cs_filter); - //LogPrintf("%s: mempool request from %s",__func__, pfrom->addr.ToString().c_str()); - // TODO: limit mempool requests per time and per peer - - std::vector vtxid; - mempool.queryHashes(vtxid); - vector vInv; - BOOST_FOREACH(uint256& hash, vtxid) { - CInv inv(MSG_TX, hash); - if (pfrom->pfilter) { - CTransaction tx; - bool fInMemPool = mempool.lookup(hash, tx); - if (!fInMemPool) continue; // another thread removed since queryHashes, maybe... - if (!pfrom->pfilter->IsRelevantAndUpdate(tx)) continue; - } - vInv.push_back(inv); - if (vInv.size() == MAX_INV_SZ) { - pfrom->PushMessage(NetMsgType::INV, vInv); - vInv.clear(); - } - } - if (vInv.size() > 0) - pfrom->PushMessage(NetMsgType::INV, vInv); } else if (strCommand == NetMsgType::ALERT) { // Small DoS penalty so peers that send us lots of // duplicate/expired/invalid-signature/whatever alerts diff --git a/src/protocol.cpp b/src/protocol.cpp index 5aa3a7dd6..326cb6193 100644 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -51,7 +51,6 @@ const char *TX="tx"; //used const char *HEADERS="headers"; //used const char *BLOCK="block"; //used const char *GETADDR="getaddr"; //used -const char *MEMPOOL="mempool"; //used const char *PING="ping"; //used const char *PONG="pong"; //used const char *NOTFOUND="notfound"; //used @@ -96,7 +95,6 @@ const static std::string allNetMessageTypes[] = { NetMsgType::HEADERS, NetMsgType::BLOCK, NetMsgType::GETADDR, - NetMsgType::MEMPOOL, NetMsgType::PING, NetMsgType::PONG, NetMsgType::NOTFOUND, diff --git a/src/protocol.h b/src/protocol.h index 3cd06fc88..f91e5e70e 100644 --- a/src/protocol.h +++ b/src/protocol.h @@ -158,12 +158,6 @@ extern const char* BLOCK; * preferably one with lots of IP addresses of other receiving nodes. */ extern const char* GETADDR; -/** - * The mempool message requests the TXIDs of transactions that the receiving - * node has verified as valid but which have not yet appeared in a block. - * @since protocol version 60002. - */ -extern const char* MEMPOOL; /** * The ping message is sent periodically to help confirm that the receiving * peer is still connected.