diff options
author | MarcoFalke <falke.marco@gmail.com> | 2022-03-22 11:49:58 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2022-03-23 11:09:34 +0100 |
commit | faf37c217a408114224f91b7ada3fb6ff29b0c0a (patch) | |
tree | f35d2ee047189e31776497a51d5cb3d53afe0376 /src/core_write.cpp | |
parent | d6f225f5c9f8382878e6970b707e57838e312f8c (diff) |
rpc: Exclude descriptor when address is excluded
Diffstat (limited to 'src/core_write.cpp')
-rw-r--r-- | src/core_write.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core_write.cpp b/src/core_write.cpp index c4b6b8d27e..8ec75880fe 100644 --- a/src/core_write.cpp +++ b/src/core_write.cpp @@ -153,7 +153,9 @@ void ScriptPubKeyToUniv(const CScript& scriptPubKey, UniValue& out, bool include CTxDestination address; out.pushKV("asm", ScriptToAsmStr(scriptPubKey)); - out.pushKV("desc", InferDescriptor(scriptPubKey, DUMMY_SIGNING_PROVIDER)->ToString()); + if (include_address) { + out.pushKV("desc", InferDescriptor(scriptPubKey, DUMMY_SIGNING_PROVIDER)->ToString()); + } if (include_hex) out.pushKV("hex", HexStr(scriptPubKey)); std::vector<std::vector<unsigned char>> solns; |