From 714201881251a787423fbca34f70fed505e9dc28 Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Wed, 16 Sep 2020 17:48:55 -0400 Subject: 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. --- src/txmempool.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/txmempool.h') 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 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& vtx, unsigned int nBlockHeight) EXCLUSIVE_LOCKS_REQUIRED(cs); -- cgit v1.2.3