diff options
Diffstat (limited to 'core/types.go')
-rw-r--r-- | core/types.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/core/types.go b/core/types.go index 027f628b1..60eb15662 100644 --- a/core/types.go +++ b/core/types.go @@ -38,14 +38,22 @@ import ( // ValidateHeader validates the given header and parent and returns an error // if it failed to do so. // -// ValidateStack validates the given statedb and optionally the receipts and +// ValidateState validates the given statedb and optionally the receipts and // gas used. The implementor should decide what to do with the given input. type Validator interface { + HeaderValidator ValidateBlock(block *types.Block) error - ValidateHeader(header, parent *types.Header, checkPow bool) error ValidateState(block, parent *types.Block, state *state.StateDB, receipts types.Receipts, usedGas *big.Int) error } +// HeaderValidator is an interface for validating headers only +// +// ValidateHeader validates the given header and parent and returns an error +// if it failed to do so. +type HeaderValidator interface { + ValidateHeader(header, parent *types.Header, checkPow bool) error +} + // Processor is an interface for processing blocks using a given initial state. // // Process takes the block to be processed and the statedb upon which the |