Automatically reserialize non-canonical proof-of-stake block signatures.
[novacoin.git] / src / script.h
index 157f41f..f490631 100644 (file)
@@ -447,7 +447,7 @@ public:
         // Immediate operand
         if (opcode <= OP_PUSHDATA4)
         {
-            uint32_t nSize;
+            uint32_t nSize = OP_0;
             if (opcode < OP_PUSHDATA1)
             {
                 nSize = opcode;
@@ -462,7 +462,6 @@ public:
             {
                 if (end() - pc < 2)
                     return false;
-                nSize = 0;
                 memcpy(&nSize, &pc[0], 2);
                 pc += 2;
             }
@@ -603,9 +602,9 @@ public:
 };
 
 bool IsCanonicalPubKey(const std::vector<unsigned char> &vchPubKey, unsigned int flags);
+bool IsDERSignature(const valtype &vchSig, bool fWithHashType=false, bool fCheckLow=false);
 bool IsCanonicalSignature(const std::vector<unsigned char> &vchSig, unsigned int flags);
 
-
 bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, const CTransaction& txTo, unsigned int nIn, unsigned int flags, int nHashType);
 bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, std::vector<std::vector<unsigned char> >& vSolutionsRet);
 int ScriptSigArgsExpected(txnouttype t, const std::vector<std::vector<unsigned char> >& vSolutions);