mirror of
https://github.com/btcsuite/btcd.git
synced 2026-08-14 12:42:51 +02:00
Some of the functions in difficulty.go are not dependent on any external functions and they are needed to introduce testing code for the invalidateblock and reconsiderblock methods that are to be added on in later commits. Having the workmath package let's us reuse the code and avoid dependency cycles. The existing functions that were exported already (HashToBig, CompactToBig, BigToCompact, CalcWork) are still kept in difficulty.go to avoid breaking external code that depends on those exported functions. |
||
|---|---|---|
| .. | ||
| difficulty.go | ||
| difficulty_test.go | ||
| README.md | ||