|
|
@ -93,7 +93,7 @@ CCriticalSection cs_vNodes; |
|
|
|
map<CInv, CDataStream> mapRelay; |
|
|
|
map<CInv, CDataStream> mapRelay; |
|
|
|
deque<pair<int64_t, CInv> > vRelayExpiration; |
|
|
|
deque<pair<int64_t, CInv> > vRelayExpiration; |
|
|
|
CCriticalSection cs_mapRelay; |
|
|
|
CCriticalSection cs_mapRelay; |
|
|
|
limitedmap<CInv, int64_t> mapAlreadyAskedFor(MAX_INV_SZ); |
|
|
|
limitedmap<uint256, int64_t> mapAlreadyAskedFor(MAX_INV_SZ); |
|
|
|
|
|
|
|
|
|
|
|
static deque<string> vOneShots; |
|
|
|
static deque<string> vOneShots; |
|
|
|
CCriticalSection cs_vOneShots; |
|
|
|
CCriticalSection cs_vOneShots; |
|
|
@ -2436,7 +2436,7 @@ void CNode::AskFor(const CInv& inv) |
|
|
|
// We're using mapAskFor as a priority queue,
|
|
|
|
// We're using mapAskFor as a priority queue,
|
|
|
|
// the key is the earliest time the request can be sent
|
|
|
|
// the key is the earliest time the request can be sent
|
|
|
|
int64_t nRequestTime; |
|
|
|
int64_t nRequestTime; |
|
|
|
limitedmap<CInv, int64_t>::const_iterator it = mapAlreadyAskedFor.find(inv); |
|
|
|
limitedmap<uint256, int64_t>::const_iterator it = mapAlreadyAskedFor.find(inv.hash); |
|
|
|
if (it != mapAlreadyAskedFor.end()) |
|
|
|
if (it != mapAlreadyAskedFor.end()) |
|
|
|
nRequestTime = it->second; |
|
|
|
nRequestTime = it->second; |
|
|
|
else |
|
|
|
else |
|
|
@ -2455,7 +2455,7 @@ void CNode::AskFor(const CInv& inv) |
|
|
|
if (it != mapAlreadyAskedFor.end()) |
|
|
|
if (it != mapAlreadyAskedFor.end()) |
|
|
|
mapAlreadyAskedFor.update(it, nRequestTime); |
|
|
|
mapAlreadyAskedFor.update(it, nRequestTime); |
|
|
|
else |
|
|
|
else |
|
|
|
mapAlreadyAskedFor.insert(std::make_pair(inv, nRequestTime)); |
|
|
|
mapAlreadyAskedFor.insert(std::make_pair(inv.hash, nRequestTime)); |
|
|
|
mapAskFor.insert(std::make_pair(nRequestTime, inv)); |
|
|
|
mapAskFor.insert(std::make_pair(nRequestTime, inv)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|