From 1cff3d6cb017aea87d16cbda0768bbab256d16da Mon Sep 17 00:00:00 2001 From: Gleb Naumenko Date: Wed, 6 Feb 2019 20:25:27 -0800 Subject: Change in transaction pull scheduling to prevent InvBlock-related attacks Co-authored-by: Suhas Daftuar --- src/net.h | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src/net.h') diff --git a/src/net.h b/src/net.h index 3c1a107b43..869c8079ca 100644 --- a/src/net.h +++ b/src/net.h @@ -67,10 +67,6 @@ static const bool DEFAULT_UPNP = USE_UPNP; #else static const bool DEFAULT_UPNP = false; #endif -/** The maximum number of entries in mapAskFor */ -static const size_t MAPASKFOR_MAX_SZ = MAX_INV_SZ; -/** The maximum number of entries in setAskFor (larger due to getdata latency)*/ -static const size_t SETASKFOR_MAX_SZ = 2 * MAX_INV_SZ; /** The maximum number of peer connections to maintain. */ static const unsigned int DEFAULT_MAX_PEER_CONNECTIONS = 125; /** The default for -maxuploadtarget. 0 = Unlimited */ @@ -514,8 +510,6 @@ extern bool fDiscover; extern bool fListen; extern bool fRelayTxes; -extern limitedmap mapAlreadyAskedFor; - /** Subversion as sent to the P2P network in `version` messages */ extern std::string strSubVersion; @@ -704,8 +698,6 @@ public: // and in the order requested. std::vector vInventoryBlockToSend GUARDED_BY(cs_inventory); CCriticalSection cs_inventory; - std::set setAskFor; - std::multimap mapAskFor; int64_t nNextInvSend{0}; // Used for headers announcements - unfiltered blocks to relay std::vector vBlockHashesToAnnounce GUARDED_BY(cs_inventory); @@ -852,8 +844,6 @@ public: vBlockHashesToAnnounce.push_back(hash); } - void AskFor(const CInv& inv); - void CloseSocketDisconnect(); void copyStats(CNodeStats &stats); -- cgit v1.2.3