(nbits, expected)
| 72 | |
| 73 | def test_calc_difficulty(self): |
| 74 | def T(nbits, expected): |
| 75 | actual = CBlockHeader.calc_difficulty(nbits) |
| 76 | actual = round(actual, 3) |
| 77 | self.assertEqual(actual, expected) |
| 78 | |
| 79 | T(486604799, 1.000) # block 0 |
| 80 | T(486594666, 1.183) # block 33333 |
nothing calls this directly
no test coverage detected