aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2012-04-13 16:28:07 -0400
committerJeff Garzik <jgarzik@redhat.com>2012-04-15 14:42:52 -0400
commit8e45ed66dde5d5eb5fde0fc1eba64b26bd48bfb0 (patch)
treea14ee478db4d23b7aa3b258db990f3df596583f9 /src/main.h
parent235507ae48718ee8ce5289b2791b4b449090dabc (diff)
downloadbitcoin-8e45ed66dde5d5eb5fde0fc1eba64b26bd48bfb0.tar.xz
CTxMemPool: encapsulate AddToMemoryPoolUnchecked(), RemoveFromMemoryPool(),
and nPooledTx
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/main.h b/src/main.h
index ef4ee137b6..bf24944ce2 100644
--- a/src/main.h
+++ b/src/main.h
@@ -67,7 +67,6 @@ extern CBigNum bnBestChainWork;
extern CBigNum bnBestInvalidWork;
extern uint256 hashBestChain;
extern CBlockIndex* pindexBest;
-extern uint64 nPooledTx;
extern unsigned int nTransactionsUpdated;
extern uint64 nLastBlockTx;
extern uint64 nLastBlockSize;
@@ -689,9 +688,6 @@ public:
protected:
const CTxOut& GetOutputFor(const CTxIn& input, const MapPrevTx& inputs) const;
- bool AddToMemoryPoolUnchecked();
-public:
- bool RemoveFromMemoryPool();
};
@@ -1614,6 +1610,17 @@ public:
mutable CCriticalSection cs;
std::map<uint256, CTransaction> mapTx;
std::map<COutPoint, CInPoint> mapNextTx;
+
+ bool addUnchecked(CTransaction &tx);
+ bool remove(CTransaction &tx);
+
+ unsigned long size()
+ {
+ LOCK(cs);
+ return mapTx.size();
+ }
};
+extern CTxMemPool mempool;
+
#endif