File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -3571,13 +3571,9 @@ UniValue createrawpegin(const JSONRPCRequest& request)
35713571 CScript witnessProgScript;
35723572 unsigned int nOut = txBTC.vout .size ();
35733573 if (request.params .size () > 2 ) {
3574- int version = -1 ;
3575- std::vector<unsigned char > witnessProgram;
3574+ // If given manually, no need for it to be a witness script
35763575 std::vector<unsigned char > witnessBytes (ParseHex (request.params [2 ].get_str ()));
35773576 witnessProgScript = CScript (witnessBytes.begin (), witnessBytes.end ());
3578- if (!witnessProgScript.IsWitnessProgram (version, witnessProgram) || version != 0 ) {
3579- throw JSONRPCError (RPC_INVALID_PARAMETER, " Given claim_script is not a valid v0 witness program." );
3580- }
35813577 nOut = GetPeginTxnOutputIndex (txBTC, witnessProgScript);
35823578 if (nOut == txBTC.vout .size ()) {
35833579 throw JSONRPCError (RPC_INVALID_PARAMETER, " Given claim_script does not match the given Bitcoin transaction." );
You can’t perform that action at this time.
0 commit comments