mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-26 11:11:41 +00:00
.circleci
.github
DOCKER
abci
behaviour
benchmarks
blockchain
cmd
config
consensus
crypto
docs
evidence
libs
lite
mempool
mock
networks
node
p2p
privval
proxy
rpc
scripts
state
txindex
codec.go
errors.go
execution.go
execution_test.go
export_test.go
helpers_test.go
main_test.go
metrics.go
services.go
state.go
state_test.go
store.go
store_test.go
tx_filter.go
tx_filter_test.go
validation.go
validation_test.go
store
test
tools
types
version
.editorconfig
.gitignore
.golangci.yml
CHANGELOG.md
CHANGELOG_PENDING.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE
Makefile
PHILOSOPHY.md
README.md
ROADMAP.md
SECURITY.md
UPGRADING.md
Vagrantfile
appveyor.yml
codecov.yml
docker-compose.yml
go.mod
go.sum
* libs: Remove usage of custom Fmt, in favor of fmt.Sprintf Closes #2193 * Fix bug that was masked by custom Fmt!
78 lines
1.7 KiB
Go
78 lines
1.7 KiB
Go
package state
|
|
|
|
import "fmt"
|
|
|
|
type (
|
|
ErrInvalidBlock error
|
|
ErrProxyAppConn error
|
|
|
|
ErrUnknownBlock struct {
|
|
Height int64
|
|
}
|
|
|
|
ErrBlockHashMismatch struct {
|
|
CoreHash []byte
|
|
AppHash []byte
|
|
Height int64
|
|
}
|
|
|
|
ErrAppBlockHeightTooHigh struct {
|
|
CoreHeight int64
|
|
AppHeight int64
|
|
}
|
|
|
|
ErrLastStateMismatch struct {
|
|
Height int64
|
|
Core []byte
|
|
App []byte
|
|
}
|
|
|
|
ErrStateMismatch struct {
|
|
Got *State
|
|
Expected *State
|
|
}
|
|
|
|
ErrNoValSetForHeight struct {
|
|
Height int64
|
|
}
|
|
|
|
ErrNoConsensusParamsForHeight struct {
|
|
Height int64
|
|
}
|
|
|
|
ErrNoABCIResponsesForHeight struct {
|
|
Height int64
|
|
}
|
|
)
|
|
|
|
func (e ErrUnknownBlock) Error() string {
|
|
return fmt.Sprintf("Could not find block #%d", e.Height)
|
|
}
|
|
|
|
func (e ErrBlockHashMismatch) Error() string {
|
|
return fmt.Sprintf("App block hash (%X) does not match core block hash (%X) for height %d", e.AppHash, e.CoreHash, e.Height)
|
|
}
|
|
|
|
func (e ErrAppBlockHeightTooHigh) Error() string {
|
|
return fmt.Sprintf("App block height (%d) is higher than core (%d)", e.AppHeight, e.CoreHeight)
|
|
}
|
|
func (e ErrLastStateMismatch) Error() string {
|
|
return fmt.Sprintf("Latest tendermint block (%d) LastAppHash (%X) does not match app's AppHash (%X)", e.Height, e.Core, e.App)
|
|
}
|
|
|
|
func (e ErrStateMismatch) Error() string {
|
|
return fmt.Sprintf("State after replay does not match saved state. Got ----\n%v\nExpected ----\n%v\n", e.Got, e.Expected)
|
|
}
|
|
|
|
func (e ErrNoValSetForHeight) Error() string {
|
|
return fmt.Sprintf("Could not find validator set for height #%d", e.Height)
|
|
}
|
|
|
|
func (e ErrNoConsensusParamsForHeight) Error() string {
|
|
return fmt.Sprintf("Could not find consensus params for height #%d", e.Height)
|
|
}
|
|
|
|
func (e ErrNoABCIResponsesForHeight) Error() string {
|
|
return fmt.Sprintf("Could not find results for height #%d", e.Height)
|
|
}
|