Skip to content

Commit 0c1b2bc

Browse files
committed
Revert "miner: Remove old CreateNewBlock w/o chainstate param"
This reverts commit 2afcf24.
1 parent ed49203 commit 0c1b2bc

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/miner.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ void BlockAssembler::resetBlock()
9696
nFees = 0;
9797
}
9898

99+
std::unique_ptr<CBlockTemplate> BlockAssembler::CreateNewBlock(const CScript& scriptPubKeyIn)
100+
{
101+
return CreateNewBlock(::ChainstateActive(), scriptPubKeyIn);
102+
}
103+
99104
std::unique_ptr<CBlockTemplate> BlockAssembler::CreateNewBlock(CChainState& chainstate, const CScript& scriptPubKeyIn)
100105
{
101106
int64_t nTimeStart = GetTimeMicros();

src/miner.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ class BlockAssembler
158158
explicit BlockAssembler(const CTxMemPool& mempool, const CChainParams& params, const Options& options);
159159

160160
/** Construct a new block template with coinbase to scriptPubKeyIn */
161+
std::unique_ptr<CBlockTemplate> CreateNewBlock(const CScript& scriptPubKeyIn);
161162
std::unique_ptr<CBlockTemplate> CreateNewBlock(CChainState& chainstate, const CScript& scriptPubKeyIn);
162163

163164
inline static std::optional<int64_t> m_last_block_num_txs{};

0 commit comments

Comments
 (0)