mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 15:39:05 +01:00
test: Properly document blockinfo size in miner_tests
This fixes a typo in the test documentation
This commit is contained in:
@@ -56,8 +56,7 @@ static BlockAssembler AssemblerForTest(const CChainParams& params) {
|
|||||||
return BlockAssembler(params, options);
|
return BlockAssembler(params, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
constexpr static struct {
|
||||||
struct {
|
|
||||||
unsigned char extranonce;
|
unsigned char extranonce;
|
||||||
unsigned int nonce;
|
unsigned int nonce;
|
||||||
} blockinfo[] = {
|
} blockinfo[] = {
|
||||||
@@ -225,7 +224,8 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
|
|||||||
BOOST_CHECK(pblocktemplate = AssemblerForTest(chainparams).CreateNewBlock(scriptPubKey));
|
BOOST_CHECK(pblocktemplate = AssemblerForTest(chainparams).CreateNewBlock(scriptPubKey));
|
||||||
|
|
||||||
// We can't make transactions until we have inputs
|
// We can't make transactions until we have inputs
|
||||||
// Therefore, load 100 blocks :)
|
// Therefore, load 110 blocks :)
|
||||||
|
static_assert(sizeof(blockinfo) / sizeof(*blockinfo) == 110, "Should have 110 blocks to import");
|
||||||
int baseheight = 0;
|
int baseheight = 0;
|
||||||
std::vector<CTransactionRef> txFirst;
|
std::vector<CTransactionRef> txFirst;
|
||||||
for (unsigned int i = 0; i < sizeof(blockinfo)/sizeof(*blockinfo); ++i)
|
for (unsigned int i = 0; i < sizeof(blockinfo)/sizeof(*blockinfo); ++i)
|
||||||
|
|||||||
Reference in New Issue
Block a user