Skip to content

Commit 6666ef1

Browse files
author
MarcoFalke
committed
test: Properly document blockinfo size in miner_tests
This fixes a typo in the test documentation
1 parent 3e94938 commit 6666ef1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/test/miner_tests.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ static BlockAssembler AssemblerForTest(const CChainParams& params) {
5656
return BlockAssembler(params, options);
5757
}
5858

59-
static
60-
struct {
59+
constexpr static struct {
6160
unsigned char extranonce;
6261
unsigned int nonce;
6362
} blockinfo[] = {
@@ -225,7 +224,8 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
225224
BOOST_CHECK(pblocktemplate = AssemblerForTest(chainparams).CreateNewBlock(scriptPubKey));
226225

227226
// We can't make transactions until we have inputs
228-
// Therefore, load 100 blocks :)
227+
// Therefore, load 110 blocks :)
228+
static_assert(sizeof(blockinfo) / sizeof(*blockinfo) == 110, "Should have 110 blocks to import");
229229
int baseheight = 0;
230230
std::vector<CTransactionRef> txFirst;
231231
for (unsigned int i = 0; i < sizeof(blockinfo)/sizeof(*blockinfo); ++i)

0 commit comments

Comments
 (0)