MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / RejectDifficultyMismatch

Function RejectDifficultyMismatch

src/test/blockchain_tests.cpp:25–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23}
24
25static void RejectDifficultyMismatch(double difficulty, double expected_difficulty) {
26 BOOST_CHECK_MESSAGE(
27 DoubleEquals(difficulty, expected_difficulty, 0.00001),
28 "Difficulty was " + std::to_string(difficulty)
29 + " but was expected to be " + std::to_string(expected_difficulty));
30}
31
32/* Given a BlockIndex with the provided nbits,
33 * verify that the expected difficulty results.

Callers 2

TestDifficultyFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85

Calls 1

DoubleEqualsFunction · 0.85

Tested by

no test coverage detected