aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorMacroFake <falke.marco@gmail.com>2022-10-07 15:05:34 +0200
committerMacroFake <falke.marco@gmail.com>2022-10-07 15:04:28 +0200
commitfa08663344eb4cea335804d149b46ff4ff081b1c (patch)
tree058993aa021832267ee1bdf503d4bfacf5407d12 /src/rpc
parent73b61717a977fc9d23f1bae3f8620641a9dee1f3 (diff)
downloadbitcoin-fa08663344eb4cea335804d149b46ff4ff081b1c.tar.xz
rpc: Return coinbase flag in scantxoutset
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/blockchain.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp
index 93d11c8276..e6ed5813b4 100644
--- a/src/rpc/blockchain.cpp
+++ b/src/rpc/blockchain.cpp
@@ -2069,6 +2069,7 @@ static RPCHelpMan scantxoutset()
{RPCResult::Type::STR_HEX, "scriptPubKey", "The script key"},
{RPCResult::Type::STR, "desc", "A specialized descriptor for the matched scriptPubKey"},
{RPCResult::Type::STR_AMOUNT, "amount", "The total amount in " + CURRENCY_UNIT + " of the unspent output"},
+ {RPCResult::Type::BOOL, "coinbase", "Whether this is a coinbase output"},
{RPCResult::Type::NUM, "height", "Height of the unspent transaction output"},
}},
}},
@@ -2172,6 +2173,7 @@ static RPCHelpMan scantxoutset()
unspent.pushKV("scriptPubKey", HexStr(txo.scriptPubKey));
unspent.pushKV("desc", descriptors[txo.scriptPubKey]);
unspent.pushKV("amount", ValueFromAmount(txo.nValue));
+ unspent.pushKV("coinbase", coin.IsCoinBase());
unspent.pushKV("height", (int32_t)coin.nHeight);
unspents.push_back(unspent);