From 6d803494b59ab5520079b6a72d97790d86d2a015 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Mon, 26 Aug 2019 17:32:47 +0900 Subject: Don't show addresses or P2PK in decoderawtransaction --- src/core_write.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/core_write.cpp b/src/core_write.cpp index 4d64446d7b..7ce2a49836 100644 --- a/src/core_write.cpp +++ b/src/core_write.cpp @@ -144,7 +144,7 @@ void ScriptToUniv(const CScript& script, UniValue& out, bool include_address) out.pushKV("type", GetTxnOutputType(type)); CTxDestination address; - if (include_address && ExtractDestination(script, address)) { + if (include_address && ExtractDestination(script, address) && type != TX_PUBKEY) { out.pushKV("address", EncodeDestination(address)); } } @@ -160,7 +160,7 @@ void ScriptPubKeyToUniv(const CScript& scriptPubKey, if (fIncludeHex) out.pushKV("hex", HexStr(scriptPubKey.begin(), scriptPubKey.end())); - if (!ExtractDestinations(scriptPubKey, type, addresses, nRequired)) { + if (!ExtractDestinations(scriptPubKey, type, addresses, nRequired) || type == TX_PUBKEY) { out.pushKV("type", GetTxnOutputType(type)); return; } -- cgit v1.2.3