We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
error
Assigning explicit error type (e.g., *ierrors.NotLeaderError) to an interface variable (e.g. var err error) will result in nil check to return false even if we assign a nil to it. See https://go.dev/doc/faq#nil_error and https://go.dev/play/p/8HUKlSDPvCT
*ierrors.NotLeaderError
var err error
nil
false
The following needs to change in bcdb/db.go:
bcdb/db.go
type DB interface { IsLeader() *ierrors.NotLeaderError }
should be
type DB interface { IsLeader() error }
type TxProcessor interface { IsLeader() *ierrors.NotLeaderError }
type TxProcessor interface { IsLeader() error }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Assigning explicit error type (e.g.,
*ierrors.NotLeaderError
) to an interface variable (e.g.var err error
) will result innil
check to returnfalse
even if we assign anil
to it.See https://go.dev/doc/faq#nil_error and https://go.dev/play/p/8HUKlSDPvCT
The following needs to change in
bcdb/db.go
:DB
should be
TxProcessor
should be
The text was updated successfully, but these errors were encountered: