aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGreg Griffith <cryptounitedteam@gmail.com>2017-05-07 00:42:04 -0400
committerGreg Griffith <cryptounitedteam@gmail.com>2017-05-07 00:42:04 -0400
commitc707ca872dcce98892431d33c250372da714f15f (patch)
treeb79bddafbdf271c3023ed76a46df69a8f177c9a9 /src
parent170bc2c381f86a523de2fc8b71d62ade66303c0d (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/net_processing.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index debab436f6..22a8e570ef 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -1552,8 +1552,6 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
uint32_t nFetchFlags = GetFetchFlags(pfrom);
- std::vector<CInv> vToFetch;
-
for (unsigned int nInv = 0; nInv < vInv.size(); nInv++)
{
CInv &inv = vInv[nInv];
@@ -1593,9 +1591,6 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
// Track requests for our stuff
GetMainSignals().Inventory(inv.hash);
}
-
- if (!vToFetch.empty())
- connman.PushMessage(pfrom, msgMaker.Make(NetMsgType::GETDATA, vToFetch));
}