From 41ff9675a92f6c080a4bb171e286060ef864a803 Mon Sep 17 00:00:00 2001 From: fivepiece Date: Sun, 8 Apr 2018 00:03:04 +0300 Subject: list the types of scripts we should consider for a witness program --- src/rpc/rawtransaction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/rpc') diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index b99906edf4..4897a2d972 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -565,7 +565,7 @@ UniValue decodescript(const JSONRPCRequest& request) r.pushKV("p2sh", EncodeDestination(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().find("witness") == std::string::npos) { + if (type.get_str() == "pubkey" || type.get_str() == "pubkeyhash" || type.get_str() == "multisig" || type.get_str() == "nonstandard") { txnouttype which_type; std::vector> solutions_data; Solver(script, which_type, solutions_data); -- cgit v1.2.3