MCPcopy Create free account
hub / github.com/ElementsProject/elements / queryHashes

Method queryHashes

src/txmempool.cpp:973–984  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

971}
972
973void CTxMemPool::queryHashes(std::vector<uint256>& vtxid) const
974{
975 LOCK(cs);
976 auto iters = GetSortedDepthAndScore();
977
978 vtxid.clear();
979 vtxid.reserve(mapTx.size());
980
981 for (auto it : iters) {
982 vtxid.push_back(it->GetTx().GetHash());
983 }
984}
985
986static TxMempoolInfo GetInfo(CTxMemPool::indexed_transaction_set::const_iterator it) {
987 return TxMempoolInfo{it->GetSharedTx(), it->GetTime(), it->GetFee(), it->GetTxSize(), it->GetModifiedFee() - it->GetFee(), it->GetDiscountTxSize()};

Callers 2

FinishFunction · 0.80
MempoolToJSONFunction · 0.80

Calls 6

GetTxMethod · 0.80
clearMethod · 0.45
reserveMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45
GetHashMethod · 0.45

Tested by 1

FinishFunction · 0.64