Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/blockchain.cpp
Show First 20 Lines • Show All 465 Lines • ▼ Show 20 Lines | static void entryToJSON(UniValue &info, const CTxMemPoolEntry &e) | ||||
UniValue depends(UniValue::VARR); | UniValue depends(UniValue::VARR); | ||||
for (const std::string &dep : setDepends) { | for (const std::string &dep : setDepends) { | ||||
depends.push_back(dep); | depends.push_back(dep); | ||||
} | } | ||||
info.pushKV("depends", depends); | info.pushKV("depends", depends); | ||||
} | } | ||||
UniValue mempoolToJSON(bool fVerbose = false) { | UniValue mempoolToJSON(bool fVerbose) { | ||||
if (fVerbose) { | if (fVerbose) { | ||||
LOCK(g_mempool.cs); | LOCK(g_mempool.cs); | ||||
UniValue o(UniValue::VOBJ); | UniValue o(UniValue::VOBJ); | ||||
for (const CTxMemPoolEntry &e : g_mempool.mapTx) { | for (const CTxMemPoolEntry &e : g_mempool.mapTx) { | ||||
const uint256 &txid = e.GetTx().GetId(); | const uint256 &txid = e.GetTx().GetId(); | ||||
UniValue info(UniValue::VOBJ); | UniValue info(UniValue::VOBJ); | ||||
entryToJSON(info, e); | entryToJSON(info, e); | ||||
o.pushKV(txid.ToString(), info); | o.pushKV(txid.ToString(), info); | ||||
▲ Show 20 Lines • Show All 1,451 Lines • Show Last 20 Lines |