mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-04 10:59:08 +02:00
[mining] segwit option must be set in GBT
Calling getblocktemplate without the segwit rule specified is most likely a client error, since it results in lower fees for the miner. Prevent this client error by failing getblocktemplate if called without the segwit rule specified.
This commit is contained in:
@@ -27,7 +27,7 @@ static std::shared_ptr<CBlock> PrepareBlock(const CScript& coinbase_scriptPubKey
|
||||
{
|
||||
auto block = std::make_shared<CBlock>(
|
||||
BlockAssembler{Params()}
|
||||
.CreateNewBlock(coinbase_scriptPubKey, /* fMineWitnessTx */ true)
|
||||
.CreateNewBlock(coinbase_scriptPubKey)
|
||||
->block);
|
||||
|
||||
block->nTime = ::chainActive.Tip()->GetMedianTimePast() + 1;
|
||||
|
||||
Reference in New Issue
Block a user