MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / AppendChunkInfo

Function AppendChunkInfo

src/rpc/mempool.cpp:476–487  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

474}
475
476void AppendChunkInfo(UniValue& all_chunks, FeePerWeight chunk_feerate, std::vector<const CTxMemPoolEntry *> chunk_txs)
477{
478 UniValue chunk(UniValue::VOBJ);
479 chunk.pushKV("chunkfee", ValueFromAmount(chunk_feerate.fee));
480 chunk.pushKV("chunkweight", chunk_feerate.size);
481 UniValue chunk_txids(UniValue::VARR);
482 for (const auto& chunk_tx : chunk_txs) {
483 chunk_txids.push_back(chunk_tx->GetTx().GetHash().ToString());
484 }
485 chunk.pushKV("txs", std::move(chunk_txids));
486 all_chunks.push_back(std::move(chunk));
487}
488
489static void clusterToJSON(const CTxMemPool& pool, UniValue& info, std::vector<const CTxMemPoolEntry *> cluster) EXCLUSIVE_LOCKS_REQUIRED(pool.cs)
490{

Callers 1

mempool.cppFile · 0.85

Calls 6

ValueFromAmountFunction · 0.85
pushKVMethod · 0.80
GetTxMethod · 0.80
push_backMethod · 0.45
ToStringMethod · 0.45
GetHashMethod · 0.45

Tested by

no test coverage detected