aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2012-04-13 18:20:44 -0400
committerJeff Garzik <jgarzik@redhat.com>2012-04-15 14:43:19 -0400
commitca4c4c53a8b1417563c72da0aea626f111a7f25d (patch)
tree50cf1fd707a6093269d0eaba6cab6df558ea45b6 /src/main.h
parentd01903e7511c143f8844bd83da884e7c9d25241e (diff)
downloadbitcoin-ca4c4c53a8b1417563c72da0aea626f111a7f25d.tar.xz
CTxMemPool: add helper methods, to reduce global mempool.mapTx accesses
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main.h b/src/main.h
index 29bd358c5c..30bf1dd698 100644
--- a/src/main.h
+++ b/src/main.h
@@ -1621,6 +1621,16 @@ public:
LOCK(cs);
return mapTx.size();
}
+
+ bool exists(uint256 hash)
+ {
+ return (mapTx.count(hash) != 0);
+ }
+
+ CTransaction& lookup(uint256 hash)
+ {
+ return mapTx[hash];
+ }
};
extern CTxMemPool mempool;