Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcwallet.cpp
Show First 20 Lines • Show All 3,245 Lines • ▼ Show 20 Lines | return RPCHelpMan{ | ||||
} | } | ||||
} | } | ||||
} | } | ||||
} | } | ||||
entry.pushKV("scriptPubKey", HexStr(scriptPubKey)); | entry.pushKV("scriptPubKey", HexStr(scriptPubKey)); | ||||
entry.pushKV("amount", out.tx->tx->vout[out.i].nValue); | entry.pushKV("amount", out.tx->tx->vout[out.i].nValue); | ||||
entry.pushKV("confirmations", out.nDepth); | entry.pushKV("confirmations", out.nDepth); | ||||
// Deprecated in v0.27.0 | |||||
if (!out.nDepth && | |||||
IsDeprecatedRPCEnabled(gArgs, | |||||
"mempool_ancestors_descendants")) { | |||||
size_t ancestor_count, descendant_count, ancestor_size; | |||||
Amount ancestor_fees; | |||||
pwallet->chain().getTransactionAncestry( | |||||
out.tx->GetId(), ancestor_count, descendant_count, | |||||
&ancestor_size, &ancestor_fees); | |||||
if (ancestor_count) { | |||||
entry.pushKV("ancestorcount", uint64_t(ancestor_count)); | |||||
entry.pushKV("ancestorsize", uint64_t(ancestor_size)); | |||||
entry.pushKV("ancestorfees", ancestor_fees); | |||||
} | |||||
} | |||||
entry.pushKV("spendable", out.fSpendable); | entry.pushKV("spendable", out.fSpendable); | ||||
entry.pushKV("solvable", out.fSolvable); | entry.pushKV("solvable", out.fSolvable); | ||||
if (out.fSolvable) { | if (out.fSolvable) { | ||||
std::unique_ptr<SigningProvider> provider = | std::unique_ptr<SigningProvider> provider = | ||||
pwallet->GetSolvingProvider(scriptPubKey); | pwallet->GetSolvingProvider(scriptPubKey); | ||||
if (provider) { | if (provider) { | ||||
auto descriptor = | auto descriptor = | ||||
InferDescriptor(scriptPubKey, *provider); | InferDescriptor(scriptPubKey, *provider); | ||||
▲ Show 20 Lines • Show All 1,713 Lines • Show Last 20 Lines |