MCPcopy Create free account
hub / github.com/ElementsProject/elements / CreateBlockIndexWithNbits

Function CreateBlockIndexWithNbits

src/test/blockchain_tests.cpp:22–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20}
21
22static CBlockIndex* CreateBlockIndexWithNbits(uint32_t nbits)
23{
24 CBlockIndex* block_index = new CBlockIndex();
25 block_index->nHeight = 46367;
26 block_index->nTime = 1269211443;
27 block_index->nBits = nbits;
28 return block_index;
29}
30
31static void RejectDifficultyMismatch(double difficulty, double expected_difficulty) {
32 BOOST_CHECK_MESSAGE(

Callers 1

TestDifficultyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected