PIVX Core  5.6.99
P2P Digital Currency
miner.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2014 The Bitcoin developers
3 // Copyright (c) 2016-2021 The PIVX Core developers
4 // Distributed under the MIT/X11 software license, see the accompanying
5 // file COPYING or https://www.opensource.org/licenses/mit-license.php.
6 
7 #ifndef PIVX_MINER_H
8 #define PIVX_MINER_H
9 
10 #include "primitives/block.h"
11 
12 #include <stdint.h>
13 
14 class CBlock;
15 class CBlockHeader;
16 class CBlockIndex;
17 class CStakeableOutput;
18 class CReserveKey;
19 class CScript;
20 class CWallet;
21 
22 struct CBlockTemplate;
23 
24 static const bool DEFAULT_PRINTPRIORITY = false;
25 
26 #ifdef ENABLE_WALLET
28  void GenerateBitcoins(bool fGenerate, CWallet* pwallet, int nThreads);
30  std::unique_ptr<CBlockTemplate> CreateNewBlockWithKey(std::unique_ptr<CReserveKey>& reservekey, CWallet* pwallet);
31  std::unique_ptr<CBlockTemplate> CreateNewBlockWithScript(const CScript& coinbaseScript, CWallet* pwallet);
32 
33  void BitcoinMiner(CWallet* pwallet, bool fProofOfStake);
34  void ThreadStakeMinter();
35 #endif // ENABLE_WALLET
36 
37 extern double dHashesPerSec;
38 extern int64_t nHPSTimerStart;
39 
40 #endif // PIVX_MINER_H
Nodes collect new transactions into a block, hash them into a hash tree, and scan through nonce value...
Definition: block.h:23
Definition: block.h:80
The block chain is a tree shaped structure starting with the genesis block at the root,...
Definition: chain.h:139
A key allocated from the key pool.
Definition: wallet.h:1256
Serialized script, used inside transaction inputs and outputs.
Definition: script.h:381
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances,...
Definition: wallet.h:577
double dHashesPerSec
int64_t nHPSTimerStart