aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.h
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2020-09-16 17:48:55 -0400
committerCarl Dong <contact@carldong.me>2021-02-18 14:49:10 -0500
commit714201881251a787423fbca34f70fed505e9dc28 (patch)
treee4dc2e14008727f3755ec41a1afe4bef762af618 /src/txmempool.h
parent71734c65dc491a4bb654ccbb7a1dd0e12131cee4 (diff)
downloadbitcoin-714201881251a787423fbca34f70fed505e9dc28.tar.xz
validation: Pass in chainstate to CTxMemPool::removeForReorg
Several other parameters are now redundant since they can be safely obtained from the chainstate given that ::cs_main is locked. These are now removed.
Diffstat (limited to 'src/txmempool.h')
-rw-r--r--src/txmempool.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/txmempool.h b/src/txmempool.h
index c0df33fe13..b8de326737 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -29,6 +29,7 @@
#include <boost/multi_index/sequenced_index.hpp>
class CBlockIndex;
+class CChainState;
extern RecursiveMutex cs_main;
/** Fake height value used in Coin to signify they are only in the memory pool (since 0.8) */
@@ -616,7 +617,7 @@ public:
void addUnchecked(const CTxMemPoolEntry& entry, setEntries& setAncestors, bool validFeeEstimate = true) EXCLUSIVE_LOCKS_REQUIRED(cs, cs_main);
void removeRecursive(const CTransaction& tx, MemPoolRemovalReason reason) EXCLUSIVE_LOCKS_REQUIRED(cs);
- void removeForReorg(const CCoinsViewCache* pcoins, unsigned int nMemPoolHeight, int flags) EXCLUSIVE_LOCKS_REQUIRED(cs, cs_main);
+ void removeForReorg(CChainState& active_chainstate, int flags) EXCLUSIVE_LOCKS_REQUIRED(cs, cs_main);
void removeConflicts(const CTransaction& tx) EXCLUSIVE_LOCKS_REQUIRED(cs);
void removeForBlock(const std::vector<CTransactionRef>& vtx, unsigned int nBlockHeight) EXCLUSIVE_LOCKS_REQUIRED(cs);