mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-13 13:21:20 +00:00
metalinter
This commit is contained in:
@ -65,7 +65,7 @@ func (blockExec *BlockExecutor) ValidateBlock(s State, block *types.Block) error
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ApplyBlock validates the block against the state, executes it against the app,
|
// ApplyBlock validates the block against the state, executes it against the app,
|
||||||
// fires the relevent events, commits the app, and saves the new state and responses.
|
// fires the relevant events, commits the app, and saves the new state and responses.
|
||||||
// It's the only function that needs to be called
|
// It's the only function that needs to be called
|
||||||
// from outside this package to process and commit an entire block.
|
// from outside this package to process and commit an entire block.
|
||||||
// It takes a blockID to avoid recomputing the parts hash.
|
// It takes a blockID to avoid recomputing the parts hash.
|
||||||
|
@ -12,11 +12,6 @@ import (
|
|||||||
//-----------------------------------------------------
|
//-----------------------------------------------------
|
||||||
// Validate block
|
// Validate block
|
||||||
|
|
||||||
// ValidateBlock validates the block against the state.
|
|
||||||
func _ValidateBlock(s State, block *types.Block) error {
|
|
||||||
return validateBlock(dbm.NewMemDB(), s, block)
|
|
||||||
}
|
|
||||||
|
|
||||||
func validateBlock(stateDB dbm.DB, s State, b *types.Block) error {
|
func validateBlock(stateDB dbm.DB, s State, b *types.Block) error {
|
||||||
// validate internal consistency
|
// validate internal consistency
|
||||||
if err := b.ValidateBasic(); err != nil {
|
if err := b.ValidateBasic(); err != nil {
|
||||||
|
Reference in New Issue
Block a user