mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-05 04:55:18 +00:00
* Fix many golint errors * Fix golint errors in the 'lite' package * Don't export Pool.store * Fix typo * Revert unwanted changes * Fix errors in counter package * Fix linter errors in kvstore package * Fix linter error in example package * Fix error in tests package * Fix linter errors in v2 package * Fix linter errors in consensus package * Fix linter errors in evidence package * Fix linter error in fail package * Fix linter errors in query package * Fix linter errors in core package * Fix linter errors in node package * Fix linter errors in mempool package * Fix linter error in conn package * Fix linter errors in pex package * Rename PEXReactor export to Reactor * Fix linter errors in trust package * Fix linter errors in upnp package * Fix linter errors in p2p package * Fix linter errors in proxy package * Fix linter errors in mock_test package * Fix linter error in client_test package * Fix linter errors in coretypes package * Fix linter errors in coregrpc package * Fix linter errors in rpcserver package * Fix linter errors in rpctypes package * Fix linter errors in rpctest package * Fix linter error in json2wal script * Fix linter error in wal2json script * Fix linter errors in kv package * Fix linter error in state package * Fix linter error in grpc_client * Fix linter errors in types package * Fix linter error in version package * Fix remaining errors * Address review comments * Fix broken tests * Reconcile package coregrpc * Fix golangci bot error * Fix new golint errors * Fix broken reference * Enable golint linter * minor changes to bring golint into line * fix failing test * fix pex reactor naming * address PR comments
51 lines
2.0 KiB
Go
51 lines
2.0 KiB
Go
package state
|
|
|
|
import (
|
|
abci "github.com/tendermint/tendermint/abci/types"
|
|
"github.com/tendermint/tendermint/types"
|
|
dbm "github.com/tendermint/tm-db"
|
|
)
|
|
|
|
//
|
|
// TODO: Remove dependence on all entities exported from this file.
|
|
//
|
|
// Every entity exported here is dependent on a private entity from the `state`
|
|
// package. Currently, these functions are only made available to tests in the
|
|
// `state_test` package, but we should not be relying on them for our testing.
|
|
// Instead, we should be exclusively relying on exported entities for our
|
|
// testing, and should be refactoring exported entities to make them more
|
|
// easily testable from outside of the package.
|
|
//
|
|
|
|
const ValSetCheckpointInterval = valSetCheckpointInterval
|
|
|
|
// UpdateState is an alias for updateState exported from execution.go,
|
|
// exclusively and explicitly for testing.
|
|
func UpdateState(
|
|
state State,
|
|
blockID types.BlockID,
|
|
header *types.Header,
|
|
abciResponses *ABCIResponses,
|
|
validatorUpdates []*types.Validator,
|
|
) (State, error) {
|
|
return updateState(state, blockID, header, abciResponses, validatorUpdates)
|
|
}
|
|
|
|
// ValidateValidatorUpdates is an alias for validateValidatorUpdates exported
|
|
// from execution.go, exclusively and explicitly for testing.
|
|
func ValidateValidatorUpdates(abciUpdates []abci.ValidatorUpdate, params types.ValidatorParams) error {
|
|
return validateValidatorUpdates(abciUpdates, params)
|
|
}
|
|
|
|
// SaveConsensusParamsInfo is an alias for the private saveConsensusParamsInfo
|
|
// method in store.go, exported exclusively and explicitly for testing.
|
|
func SaveConsensusParamsInfo(db dbm.DB, nextHeight, changeHeight int64, params types.ConsensusParams) {
|
|
saveConsensusParamsInfo(db, nextHeight, changeHeight, params)
|
|
}
|
|
|
|
// SaveValidatorsInfo is an alias for the private saveValidatorsInfo method in
|
|
// store.go, exported exclusively and explicitly for testing.
|
|
func SaveValidatorsInfo(db dbm.DB, height, lastHeightChanged int64, valSet *types.ValidatorSet) {
|
|
saveValidatorsInfo(db, height, lastHeightChanged, valSet)
|
|
}
|