diff options
Diffstat (limited to 'src/script.cpp')
| -rw-r--r-- | src/script.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/script.cpp b/src/script.cpp index 2df2e9f0d..0fe295354 100644 --- a/src/script.cpp +++ b/src/script.cpp @@ -2,12 +2,6 @@ // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include <boost/foreach.hpp> -#include <boost/tuple/tuple.hpp> - -using namespace std; -using namespace boost; - #include "script.h" #include "core.h" #include "keystore.h" @@ -16,6 +10,12 @@ using namespace boost; #include "sync.h" #include "util.h" +#include <boost/foreach.hpp> +#include <boost/tuple/tuple.hpp> + +using namespace std; +using namespace boost; + bool CheckSig(vector<unsigned char> vchSig, const vector<unsigned char> &vchPubKey, const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType, int flags); @@ -327,6 +327,8 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, co return false; if (vchPushValue.size() > MAX_SCRIPT_ELEMENT_SIZE) return false; + + // Note how OP_RESERVED does not count towards the opcode limit. if (opcode > OP_16 && ++nOpCount > 201) return false; @@ -975,7 +977,7 @@ uint256 SignatureHash(CScript scriptCode, const CTransaction& txTo, unsigned int { if (nIn >= txTo.vin.size()) { - printf("ERROR: SignatureHash() : nIn=%d out of range\n", nIn); + LogPrintf("ERROR: SignatureHash() : nIn=%d out of range\n", nIn); return 1; } CTransaction txTmp(txTo); @@ -1006,7 +1008,7 @@ uint256 SignatureHash(CScript scriptCode, const CTransaction& txTo, unsigned int unsigned int nOut = nIn; if (nOut >= txTmp.vout.size()) { - printf("ERROR: SignatureHash() : nOut=%d out of range\n", nOut); + LogPrintf("ERROR: SignatureHash() : nOut=%d out of range\n", nOut); return 1; } txTmp.vout.resize(nOut+1); |