aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2012-11-24 14:26:51 +0100
committerPieter Wuille <pieter.wuille@gmail.com>2012-11-25 11:50:35 +0100
commit231b399952fd620ee0f72b1947024dba9651630d (patch)
treeae96634672657bf13e0263ffea9a3f943e39d4aa /src/main.h
parentc07a1a6ee4d39ba04083cd7cb83fc31e91a096d5 (diff)
downloadbitcoin-231b399952fd620ee0f72b1947024dba9651630d.tar.xz
Bugfix: remove conflicting transactions from memory pool
When a transaction A is in the memory pool, while a transaction B (which shares an input with A) gets accepted into a block, A was kept forever in the memory pool. This commit adds a CTxMemPool::removeConflicts method, which removes transactions that conflict with a given transaction, and all their children. This results in less transactions in the memory pool, and faster construction of new blocks.
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.h b/src/main.h
index 8327141266..7a164c77fb 100644
--- a/src/main.h
+++ b/src/main.h
@@ -1814,7 +1814,8 @@ public:
bool accept(CTransaction &tx, bool fCheckInputs, bool* pfMissingInputs);
bool addUnchecked(const uint256& hash, CTransaction &tx);
- bool remove(CTransaction &tx);
+ bool remove(const CTransaction &tx, bool fRecursive = false);
+ bool removeConflicts(const CTransaction &tx);
void clear();
void queryHashes(std::vector<uint256>& vtxid);
void pruneSpent(const uint256& hash, CCoins &coins);