diff options
| author | Jeff Garzik <[email protected]> | 2012-06-22 11:43:34 -0400 |
|---|---|---|
| committer | Jeff Garzik <[email protected]> | 2012-06-22 11:43:34 -0400 |
| commit | 25d5c195228279b8fd891f2a7767d0529aee0ffd (patch) | |
| tree | 2da60e657e3881bfa962258cc680bc14ffde9427 /src/main.cpp | |
| parent | Merge pull request #1490 from luke-jr/gd_ljr_key (diff) | |
| download | discoin-25d5c195228279b8fd891f2a7767d0529aee0ffd.tar.xz discoin-25d5c195228279b8fd891f2a7767d0529aee0ffd.zip | |
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); +} |