Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/blockchain.cpp
Show First 20 Lines • Show All 565 Lines • ▼ Show 20 Lines | static void entryToJSON(const CTxMemPool &pool, UniValue &info, | ||||
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 spent(UniValue::VARR); | UniValue spent(UniValue::VARR); | ||||
const CTxMemPool::txiter &it = pool.mapTx.find(tx.GetId()); | const CTxMemPool::txiter &it = pool.mapTx.find(tx.GetId()); | ||||
const CTxMemPool::setEntries &setChildren = pool.GetMemPoolChildren(it); | const CTxMemPoolEntry::Children &children = it->GetMemPoolChildrenConst(); | ||||
for (CTxMemPool::txiter childiter : setChildren) { | for (const CTxMemPoolEntry &child : children) { | ||||
spent.push_back(childiter->GetTx().GetId().ToString()); | spent.push_back(child.GetTx().GetId().ToString()); | ||||
} | } | ||||
info.pushKV("spentby", spent); | info.pushKV("spentby", spent); | ||||
info.pushKV("unbroadcast", pool.IsUnbroadcastTx(tx.GetId())); | info.pushKV("unbroadcast", pool.IsUnbroadcastTx(tx.GetId())); | ||||
} | } | ||||
UniValue MempoolToJSON(const CTxMemPool &pool, bool verbose) { | UniValue MempoolToJSON(const CTxMemPool &pool, bool verbose) { | ||||
if (verbose) { | if (verbose) { | ||||
▲ Show 20 Lines • Show All 2,410 Lines • Show Last 20 Lines |