Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/blockchain.cpp
Show First 20 Lines • Show All 772 Lines • ▼ Show 20 Lines | return RPCHelpMan{ | ||||
CTxMemPool::txiter it = mempool.mapTx.find(txid); | CTxMemPool::txiter it = mempool.mapTx.find(txid); | ||||
if (it == mempool.mapTx.end()) { | if (it == mempool.mapTx.end()) { | ||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, | throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, | ||||
"Transaction not in mempool"); | "Transaction not in mempool"); | ||||
} | } | ||||
CTxMemPool::setEntries setAncestors; | CTxMemPool::setEntries setAncestors; | ||||
uint64_t noLimit = std::numeric_limits<uint64_t>::max(); | mempool.CalculateMemPoolAncestors(*it, setAncestors, false); | ||||
std::string dummy; | |||||
mempool.CalculateMemPoolAncestors(*it, setAncestors, noLimit, | |||||
noLimit, noLimit, noLimit, dummy, | |||||
false); | |||||
if (!fVerbose) { | if (!fVerbose) { | ||||
UniValue o(UniValue::VARR); | UniValue o(UniValue::VARR); | ||||
for (CTxMemPool::txiter ancestorIt : setAncestors) { | for (CTxMemPool::txiter ancestorIt : setAncestors) { | ||||
o.push_back(ancestorIt->GetTx().GetId().ToString()); | o.push_back(ancestorIt->GetTx().GetId().ToString()); | ||||
} | } | ||||
return o; | return o; | ||||
} else { | } else { | ||||
▲ Show 20 Lines • Show All 2,568 Lines • Show Last 20 Lines |