mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01: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:
@@ -54,7 +54,7 @@ std::shared_ptr<CBlock> Block(const uint256& prev_hash)
|
||||
CScript pubKey;
|
||||
pubKey << i++ << OP_TRUE;
|
||||
|
||||
auto ptemplate = BlockAssembler(Params()).CreateNewBlock(pubKey, false);
|
||||
auto ptemplate = BlockAssembler(Params()).CreateNewBlock(pubKey);
|
||||
auto pblock = std::make_shared<CBlock>(ptemplate->block);
|
||||
pblock->hashPrevBlock = prev_hash;
|
||||
pblock->nTime = ++time;
|
||||
|
||||
Reference in New Issue
Block a user