trb

trb
Log | Files | Refs

commit 2487f967637d04b3c89ea628138135b13e17ce6e
parent b04bc5a6ca5d8c67deeee39bd7e6b5b1dfa60d06
Author: Shinoa-Fores <btcinfo@sdf.org>
Date:   Wed, 13 Jan 2021 17:37:15 -0500

asciilifeform_aggressive_pushgetblocks.vpatch

Diffstat:
Mbitcoin/src/main.cpp | 8++------
Mbitcoin/src/net.cpp | 6------
Mbitcoin/src/net.h | 4----
3 files changed, 2 insertions(+), 16 deletions(-)

diff --git a/bitcoin/src/main.cpp b/bitcoin/src/main.cpp @@ -1725,13 +1725,9 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) } } - // Ask the first connected node for block updates - static int nAskedForBlocks; - if (!pfrom->fClient && - (pfrom->nVersion < 32000 || pfrom->nVersion >= 32400) && - (nAskedForBlocks < 1 || vNodes.size() <= 1)) + // Ask EVERY connected node (other than self) for block updates + if (!pfrom->fClient) { - nAskedForBlocks++; pfrom->PushGetBlocks(pindexBest, uint256(0)); } diff --git a/bitcoin/src/net.cpp b/bitcoin/src/net.cpp @@ -59,12 +59,6 @@ unsigned short GetListenPort() void CNode::PushGetBlocks(CBlockIndex* pindexBegin, uint256 hashEnd) { - // Filter out duplicate requests - if (pindexBegin == pindexLastGetBlocksBegin && hashEnd == hashLastGetBlocksEnd) - return; - pindexLastGetBlocksBegin = pindexBegin; - hashLastGetBlocksEnd = hashEnd; - PushMessage("getblocks", CBlockLocator(pindexBegin), hashEnd); } diff --git a/bitcoin/src/net.h b/bitcoin/src/net.h @@ -130,8 +130,6 @@ public: std::map<uint256, CRequestTracker> mapRequests; CCriticalSection cs_mapRequests; uint256 hashContinue; - CBlockIndex* pindexLastGetBlocksBegin; - uint256 hashLastGetBlocksEnd; int nStartingHeight; // flood relay @@ -180,8 +178,6 @@ public: nRefCount = 0; nReleaseTime = 0; hashContinue = 0; - pindexLastGetBlocksBegin = 0; - hashLastGetBlocksEnd = 0; nStartingHeight = -1; fGetAddr = false; vfSubscribe.assign(256, false);