Given a BlockIndex with the provided nbits, * verify that the expected difficulty results. */
| 43 | * verify that the expected difficulty results. |
| 44 | */ |
| 45 | static void TestDifficulty(uint32_t nbits, double expected_difficulty) |
| 46 | { |
| 47 | CBlockIndex* block_index = CreateBlockIndexWithNbits(nbits); |
| 48 | double difficulty = GetDifficulty(*block_index); |
| 49 | delete block_index; |
| 50 | |
| 51 | RejectDifficultyMismatch(difficulty, expected_difficulty); |
| 52 | } |
| 53 | |
| 54 | BOOST_FIXTURE_TEST_SUITE(blockchain_tests, BasicTestingSetup) |
| 55 |
no test coverage detected