ValidateBlock is a method on blockExec

This commit is contained in:
Ethan Buchman
2017-12-28 19:35:56 -05:00
parent ae68fcb78a
commit 6112578d07
4 changed files with 18 additions and 8 deletions

View File

@ -6,17 +6,18 @@ import (
"fmt"
"github.com/tendermint/tendermint/types"
dbm "github.com/tendermint/tmlibs/db"
)
//-----------------------------------------------------
// Validate block
// ValidateBlock validates the block against the state.
func ValidateBlock(s State, block *types.Block) error {
return validateBlock(s, block)
func _ValidateBlock(s State, block *types.Block) error {
return validateBlock(dbm.NewMemDB(), s, block)
}
func validateBlock(s State, b *types.Block) error {
func validateBlock(stateDB dbm.DB, s State, b *types.Block) error {
// validate internal consistency
if err := b.ValidateBasic(); err != nil {
return err