list the types of scripts we should consider for a witness program

This commit is contained in:
fivepiece 2018-04-08 00:03:04 +03:00
parent 4f933b3d23
commit 41ff9675a9
1 changed files with 1 additions and 1 deletions

View File

@ -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<std::vector<unsigned char>> solutions_data;
Solver(script, which_type, solutions_data);