aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@exmulti.com>2012-06-22 11:43:34 -0400
committerJeff Garzik <jgarzik@redhat.com>2012-06-22 11:43:34 -0400
commit25d5c195228279b8fd891f2a7767d0529aee0ffd (patch)
tree2da60e657e3881bfa962258cc680bc14ffde9427 /src/main.cpp
parenta08e1826981e02c7a5f18fc30b4f40a780e4e86d (diff)
RPC: add 'getrawmempool', listing all transaction ids in memory pool
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 2d3e35138c..6765ed5f05 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -652,7 +652,15 @@ bool CTxMemPool::remove(CTransaction &tx)
return true;
}
+void CTxMemPool::queryHashes(std::vector<uint256>& vtxid)
+{
+ vtxid.clear();
+ LOCK(cs);
+ vtxid.reserve(mapTx.size());
+ for (map<uint256, CTransaction>::iterator mi = mapTx.begin(); mi != mapTx.end(); ++mi)
+ vtxid.push_back((*mi).first);
+}