mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-24 12:54:07 +02:00
[doc] Update comments on dummy extraNonces in tests
This commit is contained in:
committed by
Sjors Provoost
parent
27aeeff630
commit
78df9003d6
@@ -82,7 +82,7 @@ std::shared_ptr<CBlock> MinerTestingSetup::Block(const uint256& prev_hash)
|
||||
txCoinbase.vout[1].nValue = txCoinbase.vout[0].nValue;
|
||||
txCoinbase.vout[0].nValue = 0;
|
||||
txCoinbase.vin[0].scriptWitness.SetNull();
|
||||
// Always pad with OP_0 at the end to avoid bad-cb-length error
|
||||
// Always pad with OP_0 as dummy extraNonce (also avoids bad-cb-length error for block <=16)
|
||||
const int prev_height{WITH_LOCK(::cs_main, return m_node.chainman->m_blockman.LookupBlockIndex(prev_hash)->nHeight)};
|
||||
txCoinbase.vin[0].scriptSig = CScript{} << prev_height + 1 << OP_0;
|
||||
txCoinbase.nLockTime = static_cast<uint32_t>(prev_height);
|
||||
|
||||
Reference in New Issue
Block a user