Skip to content

Commit

Permalink
rm OP_CHECKGROTH16VERIFY mode 1
Browse files Browse the repository at this point in the history
  • Loading branch information
zilong-dai committed Oct 15, 2024
1 parent 41b9477 commit 194d479
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
10 changes: 2 additions & 8 deletions src/script/interpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1043,8 +1043,8 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
}

// Only modes 0 and 1 are implemented; others return an error
if(mode.getint() != 1 && mode.getint() != 0){
// Only modes 1 is implemented; Mode 0 is deprecated; others return an error
if(mode.getint() != 1){
// TODO: Implement mode 2 and 3
return set_error(serror, SCRIPT_ERR_SIG_DER);
}
Expand All @@ -1056,12 +1056,6 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
valtype& verfierDataB = stacktop(-6);
valtype& verfierDataA = stacktop(-7);

/* TODO: drop the proof?
// Drop the signature in pre-segwit scripts but not segwit scripts
if (sigversion == SIGVERSION_BASE) {
scriptCode.FindAndDelete(CScript(vchSig));
}
*/
valtype publicInput1(32); // Initialize a 32-byte array for tx_hash
if(mode.getint()==1){
CScript scriptCode(pbegincodehash, pend);
Expand Down
2 changes: 1 addition & 1 deletion src/script/script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ const char* GetOpName(opcodetype opcode)
case OP_NOP1 : return "OP_NOP1";
case OP_CHECKLOCKTIMEVERIFY : return "OP_CHECKLOCKTIMEVERIFY";
case OP_CHECKSEQUENCEVERIFY : return "OP_CHECKSEQUENCEVERIFY";
case OP_CHECKGROTH16VERIFY : return "OP_CHECKGROTH16VERIFY";
case OP_CHECKGROTH16VERIFY : return "OP_CHECKGROTH16VERIFY";
case OP_NOP5 : return "OP_NOP5";
case OP_NOP6 : return "OP_NOP6";
case OP_NOP7 : return "OP_NOP7";
Expand Down

0 comments on commit 194d479

Please sign in to comment.