diff --git a/src/primitives/block.cpp b/src/primitives/block.cpp index d01ceab67..3130b67e2 100644 --- a/src/primitives/block.cpp +++ b/src/primitives/block.cpp @@ -3,19 +3,20 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include "primitives/block.h" +#include -#include "hash.h" -#include "crypto/scrypt.h" -#include "tinyformat.h" -#include "utilstrencodings.h" -#include "crypto/common.h" +#include +#include +#include +#include +#include uint256 CBlockHeader::GetHash() const { - if (nVersion > 6) - return SerializeHash(*this); - return GetPoWHash(); + if (nVersion > 6) + return SerializeHash(*this); + else + return GetPoWHash(); } uint256 CBlockHeader::GetPoWHash() const diff --git a/src/primitives/block.h b/src/primitives/block.h index 544b5a5f3..0516dbf16 100644 --- a/src/primitives/block.h +++ b/src/primitives/block.h @@ -6,9 +6,11 @@ #ifndef BITCOIN_PRIMITIVES_BLOCK_H #define BITCOIN_PRIMITIVES_BLOCK_H -#include "primitives/transaction.h" -#include "serialize.h" -#include "uint256.h" +#include +#include +#include +#include +#include /** Nodes collect new transactions into a block, hash them into a hash tree, * and scan through nonce values to make the block's hash satisfy proof-of-work @@ -62,7 +64,6 @@ public: } uint256 GetHash() const; - uint256 GetPoWHash() const; int64_t GetBlockTime() const @@ -72,14 +73,12 @@ public: }; - class CBlock : public CBlockHeader { public: // network and disk std::vector vtx; - - // network and disk + // ppcoin: block signature - signed by one of the coin base txout[N]'s owner std::vector vchBlockSig; // memory only @@ -136,8 +135,6 @@ public: return block; } - - std::string ToString() const; }; @@ -174,6 +171,7 @@ struct CBlockLocator { return vHave.empty(); } + }; #endif // BITCOIN_PRIMITIVES_BLOCK_H diff --git a/src/primitives/transaction.cpp b/src/primitives/transaction.cpp index 374f978ba..1f09583f8 100644 --- a/src/primitives/transaction.cpp +++ b/src/primitives/transaction.cpp @@ -3,12 +3,12 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include "primitives/transaction.h" +#include -#include "hash.h" -#include "tinyformat.h" -#include "utilstrencodings.h" -#include "script/interpreter.h" +#include +#include +#include +#include