diff options
| author | Pieter Wuille <[email protected]> | 2016-06-01 15:45:38 +0200 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2016-06-01 16:05:09 +0200 |
| commit | 01d8359983e2f77b5118fede3ffa947072c666c8 (patch) | |
| tree | 6bfb5b38a98276621ff509b6bd8f89c5a4407d81 /src/net.cpp | |
| parent | Merge #8121: [Doc] Update implemented BIPs list (diff) | |
| parent | Defer inserting into maprelay until just before relaying. (diff) | |
| download | discoin-01d8359983e2f77b5118fede3ffa947072c666c8.tar.xz discoin-01d8359983e2f77b5118fede3ffa947072c666c8.zip | |
Merge #8082: Defer inserting into maprelay until just before relaying.
4d8993b Defer inserting into maprelay until just before relaying. (Gregory Maxwell)
Diffstat (limited to 'src/net.cpp')
| -rw-r--r-- | src/net.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/net.cpp b/src/net.cpp index 78a914ebd..c09e3aedb 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -90,9 +90,6 @@ std::string strSubVersion; std::vector<CNode*> vNodes; CCriticalSection cs_vNodes; -std::map<uint256, CTransaction> mapRelay; -std::deque<std::pair<int64_t, uint256> > vRelayExpiration; -CCriticalSection cs_mapRelay; limitedmap<uint256, int64_t> mapAlreadyAskedFor(MAX_INV_SZ); static std::deque<std::string> vOneShots; @@ -2081,18 +2078,6 @@ instance_of_cnetcleanup; void RelayTransaction(const CTransaction& tx) { CInv inv(MSG_TX, tx.GetHash()); - { - LOCK(cs_mapRelay); - // Expire old relay messages - while (!vRelayExpiration.empty() && vRelayExpiration.front().first < GetTime()) - { - mapRelay.erase(vRelayExpiration.front().second); - vRelayExpiration.pop_front(); - } - - mapRelay.insert(std::make_pair(inv.hash, tx)); - vRelayExpiration.push_back(std::make_pair(GetTime() + 15 * 60, inv.hash)); - } LOCK(cs_vNodes); BOOST_FOREACH(CNode* pnode, vNodes) { |