Skip to content

Commit 41ff967

Browse files
committed
list the types of scripts we should consider for a witness program
1 parent 4f933b3 commit 41ff967

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rpc/rawtransaction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ UniValue decodescript(const JSONRPCRequest& request)
565565
r.pushKV("p2sh", EncodeDestination(CScriptID(script)));
566566
// P2SH and witness programs cannot be wrapped in P2WSH, if this script
567567
// is a witness program, don't return addresses for a segwit programs.
568-
if (type.get_str().find("witness") == std::string::npos) {
568+
if (type.get_str() == "pubkey" || type.get_str() == "pubkeyhash" || type.get_str() == "multisig" || type.get_str() == "nonstandard") {
569569
txnouttype which_type;
570570
std::vector<std::vector<unsigned char>> solutions_data;
571571
Solver(script, which_type, solutions_data);

0 commit comments

Comments
 (0)