RPC: add 'getrawmempool', listing all transaction ids in memory pool
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user