This repository was archived by the owner on Apr 2, 2025. It is now read-only.
generated from evstack/template-da-repo
-
Notifications
You must be signed in to change notification settings - Fork 5
test: add more tests and sentinel errors #66
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
3d9a5fe
test: add more tests and sentinel errors
facundomedica 84783a2
missing godoc
facundomedica 088492f
missing godoc
facundomedica 40cbbe2
Update types/errors.go
facundomedica bf5fef5
linter
facundomedica 17858ea
Merge branch 'main' into facu/add-tests-errors
tac0turtle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| package types | ||
|
|
||
| import "errors" | ||
|
|
||
| var ( | ||
| // Chain initialization errors | ||
|
|
||
| // ErrZeroInitialHeight is returned when the initial height is zero | ||
| ErrZeroInitialHeight = errors.New("initial height cannot be zero") | ||
| // ErrEmptyChainID is returned when the chain ID is empty | ||
| ErrEmptyChainID = errors.New("chain ID cannot be empty") | ||
| // ErrInvalidChainID is returned when the chain ID contains invalid characters | ||
| ErrInvalidChainID = errors.New("chain ID contains invalid characters") | ||
| // ErrChainIDTooLong is returned when the chain ID exceeds maximum length | ||
| ErrChainIDTooLong = errors.New("chain ID exceeds maximum length") | ||
| // ErrFutureGenesisTime is returned when the genesis time is in the future | ||
| ErrFutureGenesisTime = errors.New("genesis time cannot be in the future") | ||
|
|
||
| // Transaction execution errors | ||
|
|
||
| // ErrEmptyStateRoot is returned when the previous state root is empty | ||
| ErrEmptyStateRoot = errors.New("previous state root cannot be empty") | ||
| // ErrFutureBlockTime is returned when the block timestamp is in the future | ||
| ErrFutureBlockTime = errors.New("block timestamp cannot be in the future") | ||
| // ErrInvalidBlockHeight is returned when the block height is invalid | ||
| ErrInvalidBlockHeight = errors.New("invalid block height") | ||
| // ErrTxTooLarge is returned when the transaction size exceeds maximum allowed | ||
| ErrTxTooLarge = errors.New("transaction size exceeds maximum allowed") | ||
| // ErrEmptyTx is returned when the transaction is empty | ||
| ErrEmptyTx = errors.New("transaction cannot be empty") | ||
|
|
||
| // Block finalization errors | ||
|
|
||
| // ErrBlockNotFound is returned when the block is not found | ||
| ErrBlockNotFound = errors.New("block not found") | ||
| // ErrBlockAlreadyExists is returned when the block already exists | ||
| ErrBlockAlreadyExists = errors.New("block already exists") | ||
| // ErrNonSequentialBlock is returned when the block height is not sequential | ||
| ErrNonSequentialBlock = errors.New("non-sequential block height") | ||
|
|
||
| // Transaction pool errors | ||
|
|
||
| // ErrTxAlreadyExists is returned when the transaction already exists in pool | ||
| ErrTxAlreadyExists = errors.New("transaction already exists in pool") | ||
| // ErrTxPoolFull is returned when the transaction pool is full | ||
| ErrTxPoolFull = errors.New("transaction pool is full") | ||
| // ErrInvalidTxFormat is returned when the transaction format is invalid | ||
| ErrInvalidTxFormat = errors.New("invalid transaction format") | ||
|
|
||
| // Context errors | ||
|
|
||
| // ErrContextCanceled is returned when the context is canceled | ||
| ErrContextCanceled = errors.New("context canceled") | ||
| // ErrContextTimeout is returned when the context deadline is exceeded | ||
| ErrContextTimeout = errors.New("context deadline exceeded") | ||
| ) | ||
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.
Uh oh!
There was an error while loading. Please reload this page.