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

Function RejectDifficultyMismatch

src/test/blockchain_tests.cpp:35–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35static void RejectDifficultyMismatch(double difficulty, double expected_difficulty) {
36 BOOST_CHECK_MESSAGE(
37 DoubleEquals(difficulty, expected_difficulty, 0.00001),
38 "Difficulty was " + ToString(difficulty)
39 + " but was expected to be " + ToString(expected_difficulty));
40}
41
42/* Given a BlockIndex with the provided nbits,
43 * 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