CTxMemPool: add helper methods, to reduce global mempool.mapTx accesses

This commit is contained in:
Jeff Garzik
2012-04-13 18:20:44 -04:00
committed by Jeff Garzik
parent d01903e751
commit ca4c4c53a8
2 changed files with 26 additions and 8 deletions

View File

@@ -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;