diff options
| author | Giel van Schijndel <[email protected]> | 2012-06-24 12:34:15 +0200 |
|---|---|---|
| committer | Giel van Schijndel <[email protected]> | 2012-06-24 12:34:15 +0200 |
| commit | 415a87ef363396fe689ec452a30d36b1752eab2e (patch) | |
| tree | 1f68453bf98ac1a4a94394e2792fd3175480cd52 /src/bitcoinrpc.cpp | |
| parent | *Always* send a shutdown signal to enable custom shutdown actions (diff) | |
| parent | Merge pull request #1174 from sipa/torhs (diff) | |
| download | discoin-415a87ef363396fe689ec452a30d36b1752eab2e.tar.xz discoin-415a87ef363396fe689ec452a30d36b1752eab2e.zip | |
Merge branch 'master' into async-ipv6-rpc
Diffstat (limited to 'src/bitcoinrpc.cpp')
| -rw-r--r-- | src/bitcoinrpc.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index a35d33e14..25ff6c1e5 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 }, |