300@@ -301,6 +301,10 @@ bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript&
301                 opcode == OP_RSHIFT)
302                 return set_error(serror, SCRIPT_ERR_DISABLED_OPCODE); // Disabled opcodes.
303 
304+            // With SCRIPT_VERIFY_CONST_SCRIPTCODE, OP_CODESEPARATOR in non-segwit script is invalid even in an unexecuted branch
 
      
      
        
        
        
          
          
        
        
        
          
          
            
              
            
              
Perhaps out of scope, but the word “invalid” is confusing. It’s non-standard because this check is only part of STANDARD_SCRIPT_VERIFY_FLAGS. A future soft fork could make it actually invalid depending on e.g. block height. Perhaps we should use a different word like “reject”?
              
            
           
         
       
    
        
        
        
          
          
        
        
        
          
          
            
              
            
              
I mean it clearly indicates that “With SCRIPT_VERIFY_CONST_SCRIPTCODE”, and in that case it is “invalid”, same as any other invalid action.c
              
            
           
         
       
    
        
        
        
          
          
        
        
        
          
          
            
              
            
              
Not particularly concerned but I agree that ‘rejected’ would be slightly clearer here.