-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multi: update mempool error types. #2296
Commits on Jul 20, 2020
-
multi: update blockchain error types.
This updates the blockchain error types to leverage go 1.13 errors.Is/As functionality as well as confirm to the error infrastructure best practices.
Configuration menu - View commit details
-
Copy full SHA for 619cff7 - Browse repository at this point
Copy the full SHA 619cff7View commit details
Commits on Jul 24, 2020
-
rpcserver: Add handleEstimateStakeDiff test.
Because handleEstimateStakeDiff calls chain.EstimateNextStakeDifficulty up to four times, change testRPCChain.estimateNextStakeDifficulty to a function so that handlers can specify more complex return values. In TestHandleExtimateStakeDiff, have the test RPC chain return functions that return results from a queue, allowing for multiple calls with varying results. Use go-spew to print test result equality errors so that values of pointers are also printed.
Configuration menu - View commit details
-
Copy full SHA for 7130600 - Browse repository at this point
Copy the full SHA 7130600View commit details -
Configuration menu - View commit details
-
Copy full SHA for 276f0ef - Browse repository at this point
Copy the full SHA 276f0efView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4cfd644 - Browse repository at this point
Copy the full SHA 4cfd644View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7222f22 - Browse repository at this point
Copy the full SHA 7222f22View commit details -
multi: Decouple blockManager from mining.
This removes coupling between the mining code, blockManager, and the main configuration. This change is a step towards moving the mining code into its own package.
Configuration menu - View commit details
-
Copy full SHA for 700bba8 - Browse repository at this point
Copy the full SHA 700bba8View commit details -
multi: Hide CPUMiner WaitGroup.
This change wraps the CPUMiner's WaitGroup reference in preparation for moving the CPUMiner under the mining package.
Configuration menu - View commit details
-
Copy full SHA for 8932319 - Browse repository at this point
Copy the full SHA 8932319View commit details -
multi: Move mining code into mining package.
This contains the changes necessary to move the mining code into the mining package. The motivation behind these changes is to decouple the block template generation from other modules in the codebase to simplify extending it with new features and tests.
Configuration menu - View commit details
-
Copy full SHA for 7f21cf1 - Browse repository at this point
Copy the full SHA 7f21cf1View commit details -
mempool: Don't use deprecated reject code in tests.
This updates the tests to use error codes instead of the deprecated reject codes.
Configuration menu - View commit details
-
Copy full SHA for 41a1454 - Browse repository at this point
Copy the full SHA 41a1454View commit details -
mempool: Remove deprecated ErrToRejectErr func.
This removes the deprecated ErrToRejectErr function and also removes extractRejectCode since it has no other callers.
Configuration menu - View commit details
-
Copy full SHA for 35e6176 - Browse repository at this point
Copy the full SHA 35e6176View commit details -
mempool: Remove deprecated tx rule err reject code.
This removes the deprecated RejectCode from the TxRuleError struct and updates all of the callers accordingly.
Configuration menu - View commit details
-
Copy full SHA for 6b0c890 - Browse repository at this point
Copy the full SHA 6b0c890View commit details -
mempool: Remove deprecated DisableLog func.
This removes the deprecated DisableLog function since the major version has been bumped since the last release.
Configuration menu - View commit details
-
Copy full SHA for 5c5b41b - Browse repository at this point
Copy the full SHA 5c5b41bView commit details -
This makes the mempool 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: - MaxStandardTxSize - DefaultMinRelayTxFee - BaseStandardVerifyFlags Overview of the major changes: - Move the following files from mempool -> internal/mempool: - README.md - doc.go - error.go - log.go - mempool.go - mempool_test.go - policy.go - policy_test.go - Remove mempool/go.mod and mempool/go.sum - Make the README.md and doc.go files match the new reality - Update all import paths in the repository accordingly - Remove the dependency from the root go.mod - Run go mod tidy on all modules
Configuration menu - View commit details
-
Copy full SHA for 23d86d6 - Browse repository at this point
Copy the full SHA 23d86d6View commit details -
Configuration menu - View commit details
-
Copy full SHA for f6ca67c - Browse repository at this point
Copy the full SHA f6ca67cView commit details -
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: - Move the following files from 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 - Remove mining/go.mod and mining/go.sum - Make the README.md and doc.go files match the new reality - Update all import paths in the repository accordingly - Remove the dependency from the root go.mod - Run go mod tidy on all modules
Configuration menu - View commit details
-
Copy full SHA for b23f043 - Browse repository at this point
Copy the full SHA b23f043View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5581551 - Browse repository at this point
Copy the full SHA 5581551View commit details -
Configuration menu - View commit details
-
Copy full SHA for c4e5c21 - Browse repository at this point
Copy the full SHA c4e5c21View commit details -
Configuration menu - View commit details
-
Copy full SHA for 41bec0b - Browse repository at this point
Copy the full SHA 41bec0bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 080cdea - Browse repository at this point
Copy the full SHA 080cdeaView commit details -
rpcserver: add missed and live tickets rpc tests.
This adds tests for the missed and live ticket rpcs as well as the validate address rpc.
Configuration menu - View commit details
-
Copy full SHA for d3437f6 - Browse repository at this point
Copy the full SHA d3437f6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 826f2a5 - Browse repository at this point
Copy the full SHA 826f2a5View commit details -
cpuminer: Refactor code to its own package.
This does the minimum work necessary to refactor the CPU miner code into its own internal package. The idea is that separating this code into its own package will improve its testability and ultimately be useful to other parts of the codebase such as the various tests which currently effectively have their own stripped-down versions of this code. The API will certainly need some additional cleanup and changes to make it more usable outside of the specific circumstances it was originally designed to support (namely the generate RPC), however it is better to do that in future commits in order to keep the changeset as small as possible during this refactor. Overview of the major changes: - Create the new package - Move internal/mining/cpuminer.go -> internal/mining/cpuminer/cpuminer.go - Update mining logging to use the new cpuminer package logger - Rename CPUMinerConfig to Config (so it's now cpuminer.Config) - Rename NewCPUMiner to New (so it's now cpuminer.New) - Add exported BestSnapshot method to mining.BlkTmplGenerator - Add exported TxSource method to mining.BlkTmplGenerator - Update all references to the cpuminer to use the package - Add a skeleton README.md - Add a skeleton doc.go
Configuration menu - View commit details
-
Copy full SHA for 4214726 - Browse repository at this point
Copy the full SHA 4214726View commit details -
multi: update mempool error types.
This updates the standalone error types to leverage go 1.13 errors.Is/As functionality as well as conform to the error infrastructure best practices.
Configuration menu - View commit details
-
Copy full SHA for c301c0e - Browse repository at this point
Copy the full SHA c301c0eView commit details