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

Function RejectDifficultyMismatch

src/test/blockchain_tests.cpp:31–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31static void RejectDifficultyMismatch(double difficulty, double expected_difficulty) {
32 BOOST_CHECK_MESSAGE(
33 DoubleEquals(difficulty, expected_difficulty, 0.00001),
34 "Difficulty was " + ToString(difficulty)
35 + " but was expected to be " + ToString(expected_difficulty));
36}
37
38/* Given a BlockIndex with the provided nbits,
39 * verify that the expected difficulty results.

Callers 1

TestDifficultyFunction · 0.85

Calls 2

DoubleEqualsFunction · 0.85
ToStringFunction · 0.50

Tested by

no test coverage detected