Skip to content

Commit 2ce63d3

Browse files
luke-jrjtimon
authored andcommitted
MOVEONLY: Move struct CBlockTemplate to miner.h (from main.h)
1 parent 8e4578a commit 2ce63d3

File tree

3 files changed

+8
-16
lines changed

3 files changed

+8
-16
lines changed

src/main.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ class CScriptCheck;
4545
class CValidationInterface;
4646
class CValidationState;
4747

48-
struct CBlockTemplate;
4948
struct CNodeStateStats;
5049

5150
/** Default for -blockmaxsize and -blockminsize, which control the range of sizes the mining code will create **/
@@ -513,17 +512,6 @@ extern CCoinsViewCache *pcoinsTip;
513512
/** Global variable that points to the active block tree (protected by cs_main) */
514513
extern CBlockTreeDB *pblocktree;
515514

516-
struct CBlockTemplate
517-
{
518-
CBlock block;
519-
std::vector<CAmount> vTxFees;
520-
std::vector<int64_t> vTxSigOps;
521-
};
522-
523-
524-
525-
526-
527515

528516
class CValidationInterface {
529517
protected:

src/miner.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include "miner.h"
77

88
#include "amount.h"
9-
#include "primitives/block.h"
109
#include "primitives/transaction.h"
1110
#include "hash.h"
1211
#include "main.h"

src/miner.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,21 @@
66
#ifndef BITCOIN_MINER_H
77
#define BITCOIN_MINER_H
88

9+
#include "primitives/block.h"
10+
911
#include <stdint.h>
1012

11-
class CBlock;
12-
class CBlockHeader;
1313
class CBlockIndex;
1414
class CReserveKey;
1515
class CScript;
1616
class CWallet;
1717

18-
struct CBlockTemplate;
18+
struct CBlockTemplate
19+
{
20+
CBlock block;
21+
std::vector<CAmount> vTxFees;
22+
std::vector<int64_t> vTxSigOps;
23+
};
1924

2025
/** Run the miner threads */
2126
void GenerateBitcoins(bool fGenerate, CWallet* pwallet, int nThreads);

0 commit comments

Comments
 (0)