diff options
author | fanquake <fanquake@gmail.com> | 2022-10-12 10:05:37 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2022-10-12 10:28:32 +0800 |
commit | 1d277f42236d6074ea84c407ae0863ae943f27e4 (patch) | |
tree | 91b431029773e7f746efae09518e2fb2272a8eaa /src/rpc | |
parent | 5fc3939850ef8fc762bd99030873b5d632e40025 (diff) | |
parent | fa08663344eb4cea335804d149b46ff4ff081b1c (diff) | |
download | bitcoin-1d277f42236d6074ea84c407ae0863ae943f27e4.tar.xz |
Merge bitcoin/bitcoin#26280: rpc: Return coinbase flag in scantxoutset
fa08663344eb4cea335804d149b46ff4ff081b1c rpc: Return coinbase flag in scantxoutset (MacroFake)
Pull request description:
I guess it can't hurt to return this for someone that wants to know it
ACKs for top commit:
aureleoules:
ACK fa08663344eb4cea335804d149b46ff4ff081b1c
shaavan:
ACK fa08663344eb4cea335804d149b46ff4ff081b1c
Tree-SHA512: 04c554b3ed9877bab93ffcf0c1a4430cd41b30c5f4f3bf462a518fc8b3d68832dd85a29e81bd805eaa16e987856933d7a888a8c126f670bb2844bbd5ca1bf902
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/blockchain.cpp | 2 |
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); |