diff options
author | fivepiece <fivepiece@users.noreply.github.com> | 2018-04-08 00:03:04 +0300 |
---|---|---|
committer | fivepiece <fivepiece@users.noreply.github.com> | 2018-04-08 00:03:04 +0300 |
commit | 41ff9675a92f6c080a4bb171e286060ef864a803 (patch) | |
tree | 3e4ff03ddf114e5cbfe6596c044ac317105cd739 /src/rpc/rawtransaction.cpp | |
parent | 4f933b3d23010d3b03998460290faed97cd6f236 (diff) |
list the types of scripts we should consider for a witness program
Diffstat (limited to 'src/rpc/rawtransaction.cpp')
-rw-r--r-- | src/rpc/rawtransaction.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<std::vector<unsigned char>> solutions_data; Solver(script, which_type, solutions_data); |