diff options
| author | Jeff Garzik <[email protected]> | 2012-06-22 09:59:19 -0700 |
|---|---|---|
| committer | Jeff Garzik <[email protected]> | 2012-06-22 09:59:19 -0700 |
| commit | cb1fcde2f4eadc82cf8a954bb290c8d5e59257dc (patch) | |
| tree | a43528565b02f24199b1256c24d6c8457c8708bc /src/main.cpp | |
| parent | Merge pull request #1495 from Diapolo/fix_CKey_mem_leak (diff) | |
| parent | RPC: add 'getrawmempool', listing all transaction ids in memory pool (diff) | |
| download | discoin-cb1fcde2f4eadc82cf8a954bb290c8d5e59257dc.tar.xz discoin-cb1fcde2f4eadc82cf8a954bb290c8d5e59257dc.zip | |
Merge pull request #1502 from jgarzik/getrawmempool
RPC: add 'getrawmempool', listing all transaction ids in memory pool
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 2d3e35138..6765ed5f0 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); +} |