Skip to content

Commit aac354b

Browse files
committed
OP_TRUE outputs should be allowed to be segwit-ified by decodescript
1 parent 055514b commit aac354b

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

0 commit comments

Comments
 (0)