diff options
Diffstat (limited to 'src/core.h')
-rw-r--r-- | src/core.h | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/src/core.h b/src/core.h index 70e62716f3..c881a78f9d 100644 --- a/src/core.h +++ b/src/core.h @@ -2,14 +2,17 @@ // 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 BITCOIN_CORE_H #define BITCOIN_CORE_H -#include "uint256.h" -#include "serialize.h" #include "script.h" +#include "serialize.h" +#include "uint256.h" + +#include <stdint.h> -#include <stdio.h> +#include <boost/foreach.hpp> class CTransaction; @@ -114,7 +117,7 @@ public: class CTxOut { public: - int64 nValue; + int64_t nValue; CScript scriptPubKey; CTxOut() @@ -122,7 +125,7 @@ public: SetNull(); } - CTxOut(int64 nValueIn, CScript scriptPubKeyIn); + CTxOut(int64_t nValueIn, CScript scriptPubKeyIn); IMPLEMENT_SERIALIZE ( @@ -143,7 +146,7 @@ public: uint256 GetHash() const; - bool IsDust(int64 nMinRelayTxFee) const + bool IsDust(int64_t nMinRelayTxFee) const { // "Dust" is defined in terms of CTransaction::nMinRelayTxFee, // which has units satoshis-per-kilobyte. @@ -178,8 +181,8 @@ public: class CTransaction { public: - static int64 nMinTxFee; - static int64 nMinRelayTxFee; + static int64_t nMinTxFee; + static int64_t nMinRelayTxFee; static const int CURRENT_VERSION=1; int nVersion; std::vector<CTxIn> vin; @@ -246,17 +249,17 @@ private: CTxOut &txout; public: - static uint64 CompressAmount(uint64 nAmount); - static uint64 DecompressAmount(uint64 nAmount); + static uint64_t CompressAmount(uint64_t nAmount); + static uint64_t DecompressAmount(uint64_t nAmount); CTxOutCompressor(CTxOut &txoutIn) : txout(txoutIn) { } IMPLEMENT_SERIALIZE(({ if (!fRead) { - uint64 nVal = CompressAmount(txout.nValue); + uint64_t nVal = CompressAmount(txout.nValue); READWRITE(VARINT(nVal)); } else { - uint64 nVal = 0; + uint64_t nVal = 0; READWRITE(VARINT(nVal)); txout.nValue = DecompressAmount(nVal); } @@ -599,9 +602,9 @@ public: uint256 GetHash() const; - int64 GetBlockTime() const + int64_t GetBlockTime() const { - return (int64)nTime; + return (int64_t)nTime; } }; |