-
Notifications
You must be signed in to change notification settings - Fork 278
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: use cosmossdk.io/errors (#1448)
Closes #1446 Before: `make lint` showed warnings After: `make lint` shows no more warnings ```shell $ make lint --> Running golangci-lint --> Running markdownlint ```
- Loading branch information
Showing
12 changed files
with
82 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
package types | ||
|
||
import sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" | ||
import ( | ||
"cosmossdk.io/errors" | ||
) | ||
|
||
var ( | ||
ErrDuplicate = sdkerrors.Register(ModuleName, 2, "duplicate") | ||
ErrEmpty = sdkerrors.Register(ModuleName, 6, "empty") | ||
ErrNoValidators = sdkerrors.Register(ModuleName, 12, "no bonded validators in active set") | ||
ErrInvalidValAddress = sdkerrors.Register(ModuleName, 13, "invalid validator address in current valset %v") | ||
ErrInvalidEVMAddress = sdkerrors.Register(ModuleName, 14, "discovered invalid EVM address stored for validator %v") | ||
ErrInvalidValset = sdkerrors.Register(ModuleName, 15, "generated invalid valset") | ||
ErrAttestationNotValsetRequest = sdkerrors.Register(ModuleName, 16, "attestation is not a valset request") | ||
ErrAttestationNotFound = sdkerrors.Register(ModuleName, 18, "attestation not found") | ||
ErrNilAttestation = sdkerrors.Register(ModuleName, 22, "nil attestation") | ||
ErrUnmarshalllAttestation = sdkerrors.Register(ModuleName, 26, "couldn't unmarshall attestation from store") | ||
ErrNonceHigherThanLatestAttestationNonce = sdkerrors.Register(ModuleName, 27, "the provided nonce is higher than the latest attestation nonce") | ||
ErrNoValsetBeforeNonceOne = sdkerrors.Register(ModuleName, 28, "there is no valset before attestation nonce 1") | ||
ErrDataCommitmentNotGenerated = sdkerrors.Register(ModuleName, 29, "no data commitment has been generated for the provided height") | ||
ErrDataCommitmentNotFound = sdkerrors.Register(ModuleName, 30, "data commitment not found") | ||
ErrDuplicate = errors.Register(ModuleName, 2, "duplicate") | ||
ErrEmpty = errors.Register(ModuleName, 6, "empty") | ||
ErrNoValidators = errors.Register(ModuleName, 12, "no bonded validators in active set") | ||
ErrInvalidValAddress = errors.Register(ModuleName, 13, "invalid validator address in current valset %v") | ||
ErrInvalidEVMAddress = errors.Register(ModuleName, 14, "discovered invalid EVM address stored for validator %v") | ||
ErrInvalidValset = errors.Register(ModuleName, 15, "generated invalid valset") | ||
ErrAttestationNotValsetRequest = errors.Register(ModuleName, 16, "attestation is not a valset request") | ||
ErrAttestationNotFound = errors.Register(ModuleName, 18, "attestation not found") | ||
ErrNilAttestation = errors.Register(ModuleName, 22, "nil attestation") | ||
ErrUnmarshalllAttestation = errors.Register(ModuleName, 26, "couldn't unmarshall attestation from store") | ||
ErrNonceHigherThanLatestAttestationNonce = errors.Register(ModuleName, 27, "the provided nonce is higher than the latest attestation nonce") | ||
ErrNoValsetBeforeNonceOne = errors.Register(ModuleName, 28, "there is no valset before attestation nonce 1") | ||
ErrDataCommitmentNotGenerated = errors.Register(ModuleName, 29, "no data commitment has been generated for the provided height") | ||
ErrDataCommitmentNotFound = errors.Register(ModuleName, 30, "data commitment not found") | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.