From aac354b5ba2b577c5148c033eb1be074d7b92912 Mon Sep 17 00:00:00 2001 From: Gregory Sanders Date: Fri, 31 May 2019 14:02:24 -0400 Subject: [PATCH] OP_TRUE outputs should be allowed to be segwit-ified by decodescript --- src/rpc/rawtransaction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index 0e7ae85b91..34f9c806a5 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -754,7 +754,7 @@ static UniValue decodescript(const JSONRPCRequest& request) r.pushKV("p2sh", EncodeDestination(ScriptHash(CScriptID(script)))); // P2SH and witness programs cannot be wrapped in P2WSH, if this script // is a witness program, don't return addresses for a segwit programs. - if (type.get_str() == "pubkey" || type.get_str() == "pubkeyhash" || type.get_str() == "multisig" || type.get_str() == "nonstandard") { + if (type.get_str() == "pubkey" || type.get_str() == "pubkeyhash" || type.get_str() == "multisig" || type.get_str() == "nonstandard" || type.get_str() == "true") { std::vector> solutions_data; txnouttype which_type = Solver(script, solutions_data); // Uncompressed pubkeys cannot be used with segwit checksigs.