diff options
| author | fivepiece <[email protected]> | 2018-04-08 00:03:04 +0300 |
|---|---|---|
| committer | fivepiece <[email protected]> | 2018-04-08 00:03:04 +0300 |
| commit | 41ff9675a92f6c080a4bb171e286060ef864a803 (patch) | |
| tree | 3e4ff03ddf114e5cbfe6596c044ac317105cd739 /src | |
| parent | p2wpkh, p2wsh and p2sh-nested scripts in decodescript (diff) | |
| download | discoin-41ff9675a92f6c080a4bb171e286060ef864a803.tar.xz discoin-41ff9675a92f6c080a4bb171e286060ef864a803.zip | |
list the types of scripts we should consider for a witness program
Diffstat (limited to 'src')
| -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 b99906edf..4897a2d97 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); |