Skip to content

Commit 1573a82

Browse files
committed
merge bitcoin#24636: Exclude descriptor when address is excluded
Update to the "decodepsbt" description changes are not included as we don't return a "witness_utxo" object (no SegWit support)
1 parent 6393c30 commit 1573a82

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/core_write.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,9 @@ void ScriptPubKeyToUniv(const CScript& scriptPubKey, UniValue& out, bool include
163163
CTxDestination address;
164164

165165
out.pushKV("asm", ScriptToAsmStr(scriptPubKey));
166-
out.pushKV("desc", InferDescriptor(scriptPubKey, DUMMY_SIGNING_PROVIDER)->ToString());
166+
if (include_address) {
167+
out.pushKV("desc", InferDescriptor(scriptPubKey, DUMMY_SIGNING_PROVIDER)->ToString());
168+
}
167169
if (include_hex) out.pushKV("hex", HexStr(scriptPubKey));
168170

169171
std::vector<std::vector<unsigned char>> solns;

0 commit comments

Comments
 (0)