kaspad/domain/consensus/model/interface_processes_blockvalidator.go
2021-02-17 18:00:16 +02:00

16 lines
632 B
Go

package model
import (
"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
)
// BlockValidator exposes a set of validation classes, after which
// it's possible to determine whether a block is valid
type BlockValidator interface {
ValidateHeaderInIsolation(blockHash *externalapi.DomainHash) error
ValidateBodyInIsolation(blockHash *externalapi.DomainHash) error
ValidateHeaderInContext(blockHash *externalapi.DomainHash) error
ValidateBodyInContext(blockHash *externalapi.DomainHash, isPruningPoint bool) error
ValidatePruningPointViolationAndProofOfWorkAndDifficulty(blockHash *externalapi.DomainHash) error
}