]> Git Repo - VerusCoin.git/blame - src/miner.h
Prevent inputs of CC inputs
[VerusCoin.git] / src / miner.h
CommitLineData
d247a5d1 1// Copyright (c) 2009-2010 Satoshi Nakamoto
f914f1a7 2// Copyright (c) 2009-2013 The Bitcoin Core developers
78253fcb 3// Distributed under the MIT software license, see the accompanying
d247a5d1 4// file COPYING or http://www.opensource.org/licenses/mit-license.php.
51ed9ec9 5
d247a5d1
JG
6#ifndef BITCOIN_MINER_H
7#define BITCOIN_MINER_H
8
2ce63d39
LD
9#include "primitives/block.h"
10
8e8b6d70 11#include <boost/optional.hpp>
51ed9ec9
BD
12#include <stdint.h>
13
51ed9ec9 14class CBlockIndex;
51ed9ec9 15class CScript;
8e8b6d70
JG
16#ifdef ENABLE_WALLET
17class CReserveKey;
51ed9ec9 18class CWallet;
8e8b6d70 19#endif
30c43d98 20namespace Consensus { struct Params; };
d247a5d1 21
2ce63d39
LD
22struct CBlockTemplate
23{
24 CBlock block;
25 std::vector<CAmount> vTxFees;
26 std::vector<int64_t> vTxSigOps;
27};
16593898 28#define KOMODO_MAXGPUCOUNT 65
ac14bcc1 29
d247a5d1 30/** Generate a new block, without valid proof-of-work */
16593898 31CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn,int32_t gpucount);
8e8b6d70
JG
32#ifdef ENABLE_WALLET
33boost::optional<CScript> GetMinerScriptPubKey(CReserveKey& reservekey);
16593898 34CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey,int32_t nHeight,int32_t gpucount);
8e8b6d70
JG
35#else
36boost::optional<CScript> GetMinerScriptPubKey();
37CBlockTemplate* CreateNewBlockWithKey();
38#endif
c1de826f
JG
39
40#ifdef ENABLE_MINING
d247a5d1
JG
41/** Modify the extranonce in a block */
42void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int& nExtraNonce);
c1de826f
JG
43/** Run the miner threads */
44 #ifdef ENABLE_WALLET
45void GenerateBitcoins(bool fGenerate, CWallet* pwallet, int nThreads);
46 #else
47void GenerateBitcoins(bool fGenerate, int nThreads);
48 #endif
49#endif
50
bebe7282 51void UpdateTime(CBlockHeader* pblock, const Consensus::Params& consensusParams, const CBlockIndex* pindexPrev);
d247a5d1
JG
52
53#endif // BITCOIN_MINER_H
This page took 0.242697 seconds and 4 git commands to generate.