Skip to content

Commit f08756b

Browse files
committed
OP_TRUE outputs should be allowed to be segwit-ified by decodescript
1 parent 2eded09 commit f08756b

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
@@ -764,7 +764,7 @@ static UniValue decodescript(const JSONRPCRequest& request)
764764
r.pushKV("p2sh", EncodeDestination(ScriptHash(CScriptID(script))));
765765
// P2SH and witness programs cannot be wrapped in P2WSH, if this script
766766
// is a witness program, don't return addresses for a segwit programs.
767-
if (type.get_str() == "pubkey" || type.get_str() == "pubkeyhash" || type.get_str() == "multisig" || type.get_str() == "nonstandard") {
767+
if (type.get_str() == "pubkey" || type.get_str() == "pubkeyhash" || type.get_str() == "multisig" || type.get_str() == "nonstandard" || type.get_str() == "true") {
768768
std::vector<std::vector<unsigned char>> solutions_data;
769769
txnouttype which_type = Solver(script, solutions_data);
770770
// Uncompressed pubkeys cannot be used with segwit checksigs.

0 commit comments

Comments
 (0)