Skip to content

Commit c707ca8

Browse files
author
Greg Griffith
committed
removed unused code in INV message
vToFetch is never used after declaration. When checked if not empty, evaluation is always false. Best case scenario this is optimized by the compiler, worst case it wastes cpu cycles. It should be removed either way.
1 parent 170bc2c commit c707ca8

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/net_processing.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1552,8 +1552,6 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
15521552

15531553
uint32_t nFetchFlags = GetFetchFlags(pfrom);
15541554

1555-
std::vector<CInv> vToFetch;
1556-
15571555
for (unsigned int nInv = 0; nInv < vInv.size(); nInv++)
15581556
{
15591557
CInv &inv = vInv[nInv];
@@ -1593,9 +1591,6 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
15931591
// Track requests for our stuff
15941592
GetMainSignals().Inventory(inv.hash);
15951593
}
1596-
1597-
if (!vToFetch.empty())
1598-
connman.PushMessage(pfrom, msgMaker.Make(NetMsgType::GETDATA, vToFetch));
15991594
}
16001595

16011596

0 commit comments

Comments
 (0)