// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2017 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_PRIMITIVES_BLOCK_H #define BITCOIN_PRIMITIVES_BLOCK_H #include #include #include #include /** * This header is to store the proof-of-work of cryptonote mining. * Kevacoin uses Cryptonight PoW and uses its existing infrastructure * (mining pools and miners) */ class CryptoNoteHeader { public: uint8_t major_version; uint8_t minor_version; // now used as a voting mechanism, rather than how this particular block is built uint64_t timestamp; uint256 prev_id; uint32_t nonce; uint256 merkle_root; size_t nTxes; // Number of transactions. CryptoNoteHeader() { SetNull(); } void SetNull() { major_version = 0; minor_version = 0; prev_id.SetNull(); timestamp = 0; nonce = 0; merkle_root.SetNull(); nTxes = 0; } bool IsNull() const { return (timestamp == 0); } // load template