Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This requires #2274.
This makes the
mining
package an internal package such that it will no longer be an exported module. The only place its functionality is really needed is for the internal implementation of dcrd itself and thus having an unnecessary exported module significantly increases the maintenance burden.This is part of the overall effort to reduce the total number of modules and eventually get to the point it will be possible to follow semver for the root module.
It is worth noting that there are a few constants, which will be listed below, that were exported from this module that callers might have previously relied upon. However, due to previous discussions about the goal of removing the module, a code search has revealed that there are no known callers that still rely on them.
The aforementioned constants are:
UnminedHeight
MinHighPriority
Overview of the major changes:
mining
->internal/mining
:README.md
cpuminer.go
doc.go
miningerror.go
->error.go
log.go
mining.go
mining_test.go
policy.go
policy_test.go
mining/go.mod
andmining/go.sum
README.md
anddoc.go
files match the new realitygo.mod
go mod tidy
on all modules