aboutsummaryrefslogtreecommitdiff
path: root/src/script.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/script.h')
-rw-r--r--src/script.h55
1 files changed, 30 insertions, 25 deletions
diff --git a/src/script.h b/src/script.h
index 931307007f..bd120cc07d 100644
--- a/src/script.h
+++ b/src/script.h
@@ -2,19 +2,24 @@
// Copyright (c) 2009-2013 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
#ifndef H_BITCOIN_SCRIPT
#define H_BITCOIN_SCRIPT
+#include "bignum.h"
+#include "key.h"
+#include "util.h"
+
+#include <stdexcept>
+#include <stdint.h>
#include <string>
#include <vector>
#include <boost/foreach.hpp>
#include <boost/variant.hpp>
-#include "keystore.h"
-#include "bignum.h"
-
class CCoins;
+class CKeyStore;
class CTransaction;
static const unsigned int MAX_SCRIPT_ELEMENT_SIZE = 520; // bytes
@@ -247,7 +252,7 @@ inline std::string StackString(const std::vector<std::vector<unsigned char> >& v
class CScript : public std::vector<unsigned char>
{
protected:
- CScript& push_int64(int64 n)
+ CScript& push_int64(int64_t n)
{
if (n == -1 || (n >= 1 && n <= 16))
{
@@ -261,7 +266,7 @@ protected:
return *this;
}
- CScript& push_uint64(uint64 n)
+ CScript& push_uint64(uint64_t n)
{
if (n >= 1 && n <= 16)
{
@@ -298,16 +303,16 @@ public:
//explicit CScript(char b) is not portable. Use 'signed char' or 'unsigned char'.
- explicit CScript(signed char b) { operator<<(b); }
- explicit CScript(short b) { operator<<(b); }
- explicit CScript(int b) { operator<<(b); }
- explicit CScript(long b) { operator<<(b); }
- explicit CScript(int64 b) { operator<<(b); }
- explicit CScript(unsigned char b) { operator<<(b); }
- explicit CScript(unsigned int b) { operator<<(b); }
- explicit CScript(unsigned short b) { operator<<(b); }
- explicit CScript(unsigned long b) { operator<<(b); }
- explicit CScript(uint64 b) { operator<<(b); }
+ explicit CScript(signed char b) { operator<<(b); }
+ explicit CScript(short b) { operator<<(b); }
+ explicit CScript(int b) { operator<<(b); }
+ explicit CScript(long b) { operator<<(b); }
+ explicit CScript(long long b) { operator<<(b); }
+ explicit CScript(unsigned char b) { operator<<(b); }
+ explicit CScript(unsigned int b) { operator<<(b); }
+ explicit CScript(unsigned short b) { operator<<(b); }
+ explicit CScript(unsigned long b) { operator<<(b); }
+ explicit CScript(unsigned long long b) { operator<<(b); }
explicit CScript(opcodetype b) { operator<<(b); }
explicit CScript(const uint256& b) { operator<<(b); }
@@ -316,16 +321,16 @@ public:
//CScript& operator<<(char b) is not portable. Use 'signed char' or 'unsigned char'.
- CScript& operator<<(signed char b) { return push_int64(b); }
- CScript& operator<<(short b) { return push_int64(b); }
- CScript& operator<<(int b) { return push_int64(b); }
- CScript& operator<<(long b) { return push_int64(b); }
- CScript& operator<<(int64 b) { return push_int64(b); }
- CScript& operator<<(unsigned char b) { return push_uint64(b); }
- CScript& operator<<(unsigned int b) { return push_uint64(b); }
- CScript& operator<<(unsigned short b) { return push_uint64(b); }
- CScript& operator<<(unsigned long b) { return push_uint64(b); }
- CScript& operator<<(uint64 b) { return push_uint64(b); }
+ CScript& operator<<(signed char b) { return push_int64(b); }
+ CScript& operator<<(short b) { return push_int64(b); }
+ CScript& operator<<(int b) { return push_int64(b); }
+ CScript& operator<<(long b) { return push_int64(b); }
+ CScript& operator<<(long long b) { return push_int64(b); }
+ CScript& operator<<(unsigned char b) { return push_uint64(b); }
+ CScript& operator<<(unsigned int b) { return push_uint64(b); }
+ CScript& operator<<(unsigned short b) { return push_uint64(b); }
+ CScript& operator<<(unsigned long b) { return push_uint64(b); }
+ CScript& operator<<(unsigned long long b) { return push_uint64(b); }
CScript& operator<<(opcodetype opcode)
{