aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.cpp
diff options
context:
space:
mode:
authorMarcoFalke <[email protected]>2018-07-28 11:09:58 -0400
committerMarcoFalke <[email protected]>2018-07-29 08:04:06 -0400
commitfa5ed4f8d2c4cb3507bcc2460725d483f2e5789c (patch)
tree0dabe170ab89702055257cf214ab1de431aa4a9b /src/txmempool.cpp
parentMerge #13774: Return void instead of bool for functions that cannot fail (diff)
downloaddiscoin-fa5ed4f8d2c4cb3507bcc2460725d483f2e5789c.tar.xz
discoin-fa5ed4f8d2c4cb3507bcc2460725d483f2e5789c.zip
refactor: Avoid locking tx pool cs thrice
Diffstat (limited to 'src/txmempool.cpp')
-rw-r--r--src/txmempool.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 9d705e3d2..d68c38ad4 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -151,8 +151,6 @@ void CTxMemPool::UpdateTransactionsFromBlock(const std::vector<uint256> &vHashes
bool CTxMemPool::CalculateMemPoolAncestors(const CTxMemPoolEntry &entry, setEntries &setAncestors, uint64_t limitAncestorCount, uint64_t limitAncestorSize, uint64_t limitDescendantCount, uint64_t limitDescendantSize, std::string &errString, bool fSearchForParents /* = true */) const
{
- LOCK(cs);
-
setEntries parentHashes;
const CTransaction &tx = entry.GetTx();
@@ -363,7 +361,6 @@ void CTxMemPool::addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry,
// Add to memory pool without checking anything.
// Used by AcceptToMemoryPool(), which DOES do
// all the appropriate checks.
- LOCK(cs);
indexed_transaction_set::iterator newit = mapTx.insert(entry).first;
mapLinks.insert(make_pair(newit, TxLinks()));
@@ -933,7 +930,6 @@ int CTxMemPool::Expire(int64_t time) {
void CTxMemPool::addUnchecked(const uint256&hash, const CTxMemPoolEntry &entry, bool validFeeEstimate)
{
- LOCK(cs);
setEntries setAncestors;
uint64_t nNoLimit = std::numeric_limits<uint64_t>::max();
std::string dummy;