diff --git a/changelog.d/gettxout-unspendable.md b/changelog.d/gettxout-unspendable.md new file mode 100644 index 0000000000..4bda7a7018 --- /dev/null +++ b/changelog.d/gettxout-unspendable.md @@ -0,0 +1,7 @@ +Fixed + +- **`gettxout` returns null for a confirmed unspendable output.** An + `OP_RETURN` output (including the witness commitment) or a script over + 10,000 bytes was reported as an unspent coin. Core never adds these to + the UTXO set, and rbitcoin already refuses to spend them. A mempool + transaction's outputs are still listed, as in Core. diff --git a/crates/rbitcoin-rpc/src/methods/chain.rs b/crates/rbitcoin-rpc/src/methods/chain.rs index e0b854af7a..a2319e00e3 100644 --- a/crates/rbitcoin-rpc/src/methods/chain.rs +++ b/crates/rbitcoin-rpc/src/methods/chain.rs @@ -1009,6 +1009,10 @@ pub(crate) fn gettxout(ctx: &RpcContext, params: &RpcParams) -> Result