Given a BlockIndex with the provided nbits, * verify that the expected difficulty results. */
| 33 | * verify that the expected difficulty results. |
| 34 | */ |
| 35 | static void TestDifficulty(uint32_t nbits, double expected_difficulty) |
| 36 | { |
| 37 | CBlockIndex* block_index = CreateBlockIndexWithNbits(nbits); |
| 38 | double difficulty = GetDifficulty(block_index); |
| 39 | delete block_index; |
| 40 | |
| 41 | RejectDifficultyMismatch(difficulty, expected_difficulty); |
| 42 | } |
| 43 | |
| 44 | BOOST_FIXTURE_TEST_SUITE(blockchain_tests, BasicTestingSetup) |
| 45 |
no test coverage detected