Skip to content
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

pool: update error types. #245

Merged
merged 18 commits into from
Sep 16, 2020
Merged

pool: update error types. #245

merged 18 commits into from
Sep 16, 2020

Conversation

dnldd
Copy link
Member

@dnldd dnldd commented Sep 7, 2020

This updates the error types to leverage go 1.13 errors.Is/As functionality, conforming to the updated error infrastructure detailed here.

This updates error types to leverage go 1.13 errors.Is/As functionality.
This updates errors generated by the accepted work
type to use defined error types and provide more
error context.
This updates errors generated by the account type to use
defined error types and provide more error context.
This updates errors generated by the job type to use
defined error types and provide more error context.
This updates errors generated by the payment type to use
defined error types and provide more error context.
This updates errors generated by the share type to use
defined error types and provide more error context.
This updates errors generated by database helper funcs to
use defined error types and provide more error context.
This updates errors generated by message helpers to use
defined error types and provide more error context.
This updates errors generated by the difficulty type to use
defined error types and provide more error context.
This updates errors and logs generated by the chainstate type
to use defined error types and provide more error context.
This updates errors generated by the payment manager
type to use defined error types and provide more error context.
This updates errors generated by the db upgrade helpers
to use defined error types and provide more error context.
This updates errors and log generated by the client type
to use defined error types and provide more error context.
This updates errors and logs generated by the hub type
to use defined error types and provide more error context.
pool/acceptedwork.go Outdated Show resolved Hide resolved
pool/acceptedwork.go Outdated Show resolved Hide resolved
pool/account.go Outdated Show resolved Hide resolved
pool/acceptedwork.go Outdated Show resolved Hide resolved
pool/account.go Outdated Show resolved Hide resolved
pool/upgrades.go Outdated Show resolved Hide resolved
pool/upgrades.go Outdated Show resolved Hide resolved
pool/upgrades.go Outdated Show resolved Hide resolved
pool/upgrades_test.go Outdated Show resolved Hide resolved
pool/upgrades_test.go Outdated Show resolved Hide resolved
@dnldd
Copy link
Member Author

dnldd commented Sep 14, 2020

I also updated all funcName definitions to const, @davecgh prompted me that using const for those would save a local stack allocation.

pool/acceptedwork.go Outdated Show resolved Hide resolved
pool/error.go Outdated Show resolved Hide resolved
pool/error.go Outdated Show resolved Hide resolved
pool/message.go Outdated Show resolved Hide resolved
pool/upgrades_test.go Outdated Show resolved Hide resolved
pool/chainstate_test.go Outdated Show resolved Hide resolved
pool/chainstate_test.go Outdated Show resolved Hide resolved
pool/share_test.go Outdated Show resolved Hide resolved
pool/upgrades_test.go Outdated Show resolved Hide resolved
@dnldd
Copy link
Member Author

dnldd commented Sep 15, 2020

Removed bigEndianBytesToHeight as well because it's unused.

pool/client.go Outdated Show resolved Hide resolved
pool/upgrades_test.go Outdated Show resolved Hide resolved
pool/acceptedwork.go Outdated Show resolved Hide resolved
Copy link
Member

@jholdstock jholdstock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two more issues spotted and then this looks good to go

@dnldd dnldd merged commit 89827b5 into decred:master Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants