dcrd/internal
Dave Collins ecf6c6313e
primitives: Add work calc from diff bits.
This implements code for calculating a uint256 work value from
difficulty bits along with associated tests.

The function is the semantic equivalent of CalcWork from
blockchain/standalone updated to use and return the new uint256 type
instead of stdlib big integers.

Note that the original calculation involves a dividend of 2^256 which is
not directly representable by a uint256, so this implementation retains
the same semantics by transforming the calculation as described in
detail by the comments.
2021-12-04 15:49:08 -06:00
..
fees fees: Remove deprecated DisableLog. 2020-12-28 13:13:47 -06:00
limits multi: update build tags to pref. go1.17 syntax. 2021-10-19 20:21:44 -05:00
mempool mempool: Convert to use stdscript. 2021-11-18 12:33:40 -06:00
mining multi: Allow discrete mining with invalidated tip. 2021-12-03 12:05:15 -06:00
netsync netsync: Rework next block download logic. 2021-11-24 23:53:45 -06:00
progresslog progresslog: Make header logging concurrent safe. 2021-11-23 17:24:58 -06:00
rpcserver rpcserver: Convert to use stdscript. 2021-11-18 12:55:12 -06:00
staging/primitives primitives: Add work calc from diff bits. 2021-12-04 15:49:08 -06:00
version version: Use uint32 for major/minor/patch. 2021-11-10 07:08:23 -06:00