aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoinrpc.cpp
diff options
context:
space:
mode:
authorGiel van Schijndel <me@mortis.eu>2012-06-24 12:34:15 +0200
committerGiel van Schijndel <me@mortis.eu>2012-06-24 12:34:15 +0200
commit415a87ef363396fe689ec452a30d36b1752eab2e (patch)
tree1f68453bf98ac1a4a94394e2792fd3175480cd52 /src/bitcoinrpc.cpp
parent896899e0d66e25f6549a92749d237c8a87b12f08 (diff)
parent817ee0d826087d418b5f0bffcdd92429574284e2 (diff)
Merge branch 'master' into async-ipv6-rpc
Diffstat (limited to 'src/bitcoinrpc.cpp')
-rw-r--r--src/bitcoinrpc.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp
index a35d33e14e..25ff6c1e5f 100644
--- a/src/bitcoinrpc.cpp
+++ b/src/bitcoinrpc.cpp
@@ -2198,6 +2198,23 @@ Value getmemorypool(const Array& params, bool fHelp)
}
}
+Value getrawmempool(const Array& params, bool fHelp)
+{
+ if (fHelp || params.size() != 0)
+ throw runtime_error(
+ "getrawmempool\n"
+ "Returns all transaction ids in memory pool.");
+
+ vector<uint256> vtxid;
+ mempool.queryHashes(vtxid);
+
+ Array a;
+ BOOST_FOREACH(const uint256& hash, vtxid)
+ a.push_back(hash.ToString());
+
+ return a;
+}
+
Value getblockhash(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 1)
@@ -2321,6 +2338,7 @@ static const CRPCCommand vRPCCommands[] =
{ "sendfrom", &sendfrom, false },
{ "sendmany", &sendmany, false },
{ "addmultisigaddress", &addmultisigaddress, false },
+ { "getrawmempool", &getrawmempool, true },
{ "getblock", &getblock, false },
{ "getblockhash", &getblockhash, false },
{ "gettransaction", &gettransaction, false },