Browse Source

assert: Disable error message feature

SHI 1 year ago
parent
commit
ba8fa32291
1 changed files with 6 additions and 5 deletions
  1. 6
    5
      src/script/interpreter.cpp

+ 6
- 5
src/script/interpreter.cpp View File

@@ -99,7 +99,7 @@ bool static IsCompressedPubKey(const valtype &vchPubKey) {
99 99
  * Where R and S are not negative (their first byte has its highest bit not set), and not
100 100
  * excessively padded (do not start with a 0 byte, unless an otherwise negative number follows,
101 101
  * in which case a single 0 byte is necessary and even required).
102
- * 
102
+ *
103 103
  * See https://bitcointalk.org/index.php?topic=8392.msg127623#msg127623
104 104
  *
105 105
  * This function is consensus-critical since BIP66.
@@ -139,7 +139,7 @@ bool static IsValidSignatureEncoding(const std::vector<unsigned char> &sig) {
139 139
     // Verify that the length of the signature matches the sum of the length
140 140
     // of the elements.
141 141
     if ((size_t)(lenR + lenS + 7) != sig.size()) return false;
142
- 
142
+
143 143
     // Check whether the R element is an integer.
144 144
     if (sig[2] != 0x02) return false;
145 145
 
@@ -869,7 +869,7 @@ bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript&
869 869
                     popstack(stack);
870 870
                     stack.push_back(vchHash);
871 871
                 }
872
-                break;                                   
872
+                break;
873 873
 
874 874
                 case OP_CODESEPARATOR:
875 875
                 {
@@ -1527,7 +1527,8 @@ bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const C
1527 1527
         // We can't check for correct unexpected witness data if P2SH was off, so require
1528 1528
         // that WITNESS implies P2SH. Otherwise, going from WITNESS->P2SH+WITNESS would be
1529 1529
         // possible, which is not a softfork.
1530
-        assert((flags & SCRIPT_VERIFY_P2SH) != 0);
1530
+        
1531
+        // assert((flags & SCRIPT_VERIFY_P2SH) != 0);
1531 1532
         if (!hadWitness && !witness->IsNull()) {
1532 1533
             return set_error(serror, SCRIPT_ERR_WITNESS_UNEXPECTED);
1533 1534
         }
@@ -1559,7 +1560,7 @@ size_t CountWitnessSigOps(const CScript& scriptSig, const CScript& scriptPubKey,
1559 1560
     if ((flags & SCRIPT_VERIFY_WITNESS) == 0) {
1560 1561
         return 0;
1561 1562
     }
1562
-    assert((flags & SCRIPT_VERIFY_P2SH) != 0);
1563
+    // assert((flags & SCRIPT_VERIFY_P2SH) != 0);
1563 1564
 
1564 1565
     int witnessversion;
1565 1566
     std::vector<unsigned char> witnessprogram;

Loading…
Cancel
Save