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.
This commit is contained in:
parent
170bc2c381
commit
c707ca872d
1 changed files with 0 additions and 5 deletions
|
@ -1552,8 +1552,6 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
|
||||||
|
|
||||||
uint32_t nFetchFlags = GetFetchFlags(pfrom);
|
uint32_t nFetchFlags = GetFetchFlags(pfrom);
|
||||||
|
|
||||||
std::vector<CInv> vToFetch;
|
|
||||||
|
|
||||||
for (unsigned int nInv = 0; nInv < vInv.size(); nInv++)
|
for (unsigned int nInv = 0; nInv < vInv.size(); nInv++)
|
||||||
{
|
{
|
||||||
CInv &inv = vInv[nInv];
|
CInv &inv = vInv[nInv];
|
||||||
|
@ -1593,9 +1591,6 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
|
||||||
// Track requests for our stuff
|
// Track requests for our stuff
|
||||||
GetMainSignals().Inventory(inv.hash);
|
GetMainSignals().Inventory(inv.hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!vToFetch.empty())
|
|
||||||
connman.PushMessage(pfrom, msgMaker.Make(NetMsgType::GETDATA, vToFetch));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue