diff options
Diffstat (limited to 'src/script')
| -rw-r--r-- | src/script/interpreter.cpp | 5 | ||||
| -rw-r--r-- | src/script/interpreter.h | 6 | ||||
| -rw-r--r-- | src/script/script.h | 6 | ||||
| -rw-r--r-- | src/script/sigcache.cpp | 2 | ||||
| -rw-r--r-- | src/script/sigcache.h | 6 | ||||
| -rw-r--r-- | src/script/sign.h | 6 | ||||
| -rw-r--r-- | src/script/standard.cpp | 1 | ||||
| -rw-r--r-- | src/script/standard.h | 10 |
8 files changed, 22 insertions, 20 deletions
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index 3625972eb..54c2847f7 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -9,7 +9,8 @@ #include "crypto/ripemd160.h" #include "crypto/sha1.h" #include "crypto/sha2.h" -#include "key.h" +#include "eccryptoverify.h" +#include "pubkey.h" #include "script/script.h" #include "uint256.h" #include "util.h" @@ -122,7 +123,7 @@ bool static IsLowDERSignature(const valtype &vchSig) { // If the S value is above the order of the curve divided by two, its // complement modulo the order could have been used instead, which is // one byte shorter when encoded correctly. - if (!CKey::CheckSignatureElement(S, nLenS, true)) + if (!eccrypto::CheckSignatureElement(S, nLenS, true)) return error("Non-canonical signature: S value is unnecessarily high"); return true; diff --git a/src/script/interpreter.h b/src/script/interpreter.h index 5133c80aa..ed899fc41 100644 --- a/src/script/interpreter.h +++ b/src/script/interpreter.h @@ -3,8 +3,8 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef H_BITCOIN_SCRIPT_INTERPRETER -#define H_BITCOIN_SCRIPT_INTERPRETER +#ifndef BITCOIN_SCRIPT_INTERPRETER_H +#define BITCOIN_SCRIPT_INTERPRETER_H #include <vector> #include <stdint.h> @@ -88,4 +88,4 @@ public: bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, unsigned int flags, const BaseSignatureChecker& checker); bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, unsigned int flags, const BaseSignatureChecker& checker); -#endif // H_BITCOIN_SCRIPT_INTERPRETER +#endif // BITCOIN_SCRIPT_INTERPRETER_H diff --git a/src/script/script.h b/src/script/script.h index 05f2e7e3a..e525ad13e 100644 --- a/src/script/script.h +++ b/src/script/script.h @@ -3,8 +3,8 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef H_BITCOIN_SCRIPT -#define H_BITCOIN_SCRIPT +#ifndef BITCOIN_SCRIPT_SCRIPT_H +#define BITCOIN_SCRIPT_SCRIPT_H #include <assert.h> #include <climits> @@ -592,4 +592,4 @@ public: } }; -#endif // H_BITCOIN_SCRIPT +#endif // BITCOIN_SCRIPT_SCRIPT_H diff --git a/src/script/sigcache.cpp b/src/script/sigcache.cpp index ab366898d..d76a5acd6 100644 --- a/src/script/sigcache.cpp +++ b/src/script/sigcache.cpp @@ -5,7 +5,7 @@ #include "sigcache.h" -#include "key.h" +#include "pubkey.h" #include "random.h" #include "uint256.h" #include "util.h" diff --git a/src/script/sigcache.h b/src/script/sigcache.h index 46b8f4d33..df2a2ea13 100644 --- a/src/script/sigcache.h +++ b/src/script/sigcache.h @@ -3,8 +3,8 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef H_BITCOIN_SCRIPT_SIGCACHE -#define H_BITCOIN_SCRIPT_SIGCACHE +#ifndef BITCOIN_SCRIPT_SIGCACHE_H +#define BITCOIN_SCRIPT_SIGCACHE_H #include "script/interpreter.h" @@ -23,4 +23,4 @@ public: bool VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& vchPubKey, const uint256& sighash) const; }; -#endif // H_BITCOIN_SCRIPT_SIGCACHE +#endif // BITCOIN_SCRIPT_SIGCACHE_H diff --git a/src/script/sign.h b/src/script/sign.h index f218a6456..c84d3f9a9 100644 --- a/src/script/sign.h +++ b/src/script/sign.h @@ -3,8 +3,8 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef H_BITCOIN_SCRIPT_SIGN -#define H_BITCOIN_SCRIPT_SIGN +#ifndef BITCOIN_SCRIPT_SIGN_H +#define BITCOIN_SCRIPT_SIGN_H #include "script/interpreter.h" @@ -21,4 +21,4 @@ bool SignSignature(const CKeyStore& keystore, const CTransaction& txFrom, CMutab // combine them intelligently and return the result. CScript CombineSignatures(CScript scriptPubKey, const CTransaction& txTo, unsigned int nIn, const CScript& scriptSig1, const CScript& scriptSig2); -#endif // H_BITCOIN_SCRIPT_SIGN +#endif // BITCOIN_SCRIPT_SIGN_H diff --git a/src/script/standard.cpp b/src/script/standard.cpp index 7356e541a..e238ecedb 100644 --- a/src/script/standard.cpp +++ b/src/script/standard.cpp @@ -5,6 +5,7 @@ #include "script/standard.h" +#include "pubkey.h" #include "script/script.h" #include "util.h" #include "utilstrencodings.h" diff --git a/src/script/standard.h b/src/script/standard.h index 504d98c68..faa774760 100644 --- a/src/script/standard.h +++ b/src/script/standard.h @@ -3,11 +3,10 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef H_BITCOIN_SCRIPT_STANDARD -#define H_BITCOIN_SCRIPT_STANDARD +#ifndef BITCOIN_SCRIPT_STANDARD_H +#define BITCOIN_SCRIPT_STANDARD_H -#include "key.h" -#include "script/script.h" +#include "uint256.h" #include "script/interpreter.h" #include <boost/variant.hpp> @@ -15,6 +14,7 @@ #include <stdint.h> class CScript; +class CKeyID; /** A reference to a CScript: the Hash160 of its serialization (see script.h) */ class CScriptID : public uint160 @@ -84,4 +84,4 @@ bool ExtractDestinations(const CScript& scriptPubKey, txnouttype& typeRet, std:: CScript GetScriptForDestination(const CTxDestination& dest); CScript GetScriptForMultisig(int nRequired, const std::vector<CPubKey>& keys); -#endif // H_BITCOIN_SCRIPT_STANDARD +#endif // BITCOIN_SCRIPT_STANDARD_H |