aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.cpp
diff options
context:
space:
mode:
authorGreg Griffith <[email protected]>2017-05-07 00:42:04 -0400
committerGreg Griffith <[email protected]>2017-05-07 00:42:04 -0400
commitc707ca872dcce98892431d33c250372da714f15f (patch)
treeb79bddafbdf271c3023ed76a46df69a8f177c9a9 /src/net_processing.cpp
parentMerge #10318: [tests] fix wait_for_inv() (diff)
downloaddiscoin-c707ca872dcce98892431d33c250372da714f15f.tar.xz
discoin-c707ca872dcce98892431d33c250372da714f15f.zip
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/net_processing.cpp')
-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 debab436f..22a8e570e 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));
}