forked from dashpay/dash
-
Notifications
You must be signed in to change notification settings - Fork 717
/
Copy pathminer.h
40 lines (30 loc) · 1.18 KB
/
miner.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2016-2021 The PIVX Core developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or https://www.opensource.org/licenses/mit-license.php.
#ifndef PIVX_MINER_H
#define PIVX_MINER_H
#include "primitives/block.h"
#include <stdint.h>
class CBlock;
class CBlockHeader;
class CBlockIndex;
class CStakeableOutput;
class CReserveKey;
class CScript;
class CWallet;
struct CBlockTemplate;
static const bool DEFAULT_PRINTPRIORITY = false;
#ifdef ENABLE_WALLET
/** Run the miner threads */
void GenerateBitcoins(bool fGenerate, CWallet* pwallet, int nThreads);
/** Generate a new PoW block, without valid proof-of-work */
std::unique_ptr<CBlockTemplate> CreateNewBlockWithKey(std::unique_ptr<CReserveKey>& reservekey, CWallet* pwallet);
std::unique_ptr<CBlockTemplate> CreateNewBlockWithScript(const CScript& coinbaseScript, CWallet* pwallet);
void BitcoinMiner(CWallet* pwallet, bool fProofOfStake);
void ThreadStakeMinter();
#endif // ENABLE_WALLET
extern double dHashesPerSec;
extern int64_t nHPSTimerStart;
#endif // PIVX_MINER_H