btcd/blockchain/internal/workmath/README.md
Calvin Kim 597b68c79e blockchain, workmath: refactor functions to workmath package
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.
2024-04-23 02:35:36 +09:00

630 B

workmath

Build Status ISC License GoDoc

Package workmath provides utility functions that are related with calculating the work from difficulty bits. This package was introduced to avoid import cycles in btcd.

License

Package workmath is licensed under the copyfree ISC License.