From 78e691ea10a17092dd65cf0b22c814e9fb3438f0 Mon Sep 17 00:00:00 2001 From: sedited Date: Mon, 31 Aug 2026 16:41:37 +0200 Subject: [PATCH] rpc: Change listunspent's ancestorfees type to NUM This seems to be the only place where a STR_AMOUNT is used for a sats denominated fee amount. Many other places use the raw NUM type for a fee amount, for example getblockstats and getblocktemplate. This doesn't change the actual result of the RPC call. The change is motivated by OpenRPC, where the field was previously given a 'x-bitcoin-unit' tag. This usually describes a decimal amount, and may be confusing for consumers applying this tag. --- src/wallet/rpc/coins.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/rpc/coins.cpp b/src/wallet/rpc/coins.cpp index c929710b40a..cafdaae40cd 100644 --- a/src/wallet/rpc/coins.cpp +++ b/src/wallet/rpc/coins.cpp @@ -495,7 +495,7 @@ RPCMethod listunspent() {RPCResult::Type::NUM, "confirmations", "The number of confirmations"}, {RPCResult::Type::NUM, "ancestorcount", /*optional=*/true, "The number of in-mempool ancestor transactions, including this one (if transaction is in the mempool)"}, {RPCResult::Type::NUM, "ancestorsize", /*optional=*/true, "The virtual transaction size of in-mempool ancestors, including this one (if transaction is in the mempool)"}, - {RPCResult::Type::STR_AMOUNT, "ancestorfees", /*optional=*/true, "The total fees of in-mempool ancestors (including this one) with fee deltas used for mining priority in " + CURRENCY_ATOM + " (if transaction is in the mempool)"}, + {RPCResult::Type::NUM, "ancestorfees", /*optional=*/true, "The total fees of in-mempool ancestors (including this one) with fee deltas used for mining priority in " + CURRENCY_ATOM + " (if transaction is in the mempool)"}, {RPCResult::Type::STR_HEX, "redeemScript", /*optional=*/true, "The redeem script if the output script is P2SH"}, {RPCResult::Type::STR, "witnessScript", /*optional=*/true, "witness script if the output script is P2WSH or P2SH-P2WSH"}, {RPCResult::Type::BOOL, "spendable", "(DEPRECATED) Always true"},