aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/headerchain.go4
-rw-r--r--core/types.go4
2 files changed, 6 insertions, 2 deletions
diff --git a/core/headerchain.go b/core/headerchain.go
index ef77aa28a..62a2bf805 100644
--- a/core/headerchain.go
+++ b/core/headerchain.go
@@ -465,7 +465,7 @@ func (c *headerVerifierCache) configuration(round uint64) *params.DexconConfig {
func (hc *HeaderChain) ValidateDexonHeaderChain(chain []*types.HeaderWithGovState,
gov dexcon.GovernanceStateFetcher,
- verifierCache *dexCore.TSigVerifierCache, validator Validator) (int, error) {
+ verifierCache *dexCore.TSigVerifierCache, validator HeaderValidator) (int, error) {
// Do a sanity check that the provided chain is actually ordered and linked
for i := 1; i < len(chain); i++ {
if chain[i].Number.Uint64() != chain[i-1].Number.Uint64()+1 || chain[i].ParentHash != chain[i-1].Hash() {
@@ -534,7 +534,7 @@ func (hc *HeaderChain) ValidateDexonHeaderChain(chain []*types.HeaderWithGovStat
func (hc *HeaderChain) VerifyDexonHeader(header *types.Header,
gov dexcon.GovernanceStateFetcher,
- verifierCache *dexCore.TSigVerifierCache, validator Validator) error {
+ verifierCache *dexCore.TSigVerifierCache, validator HeaderValidator) error {
if parent := hc.GetHeader(header.ParentHash, header.Number.Uint64()-1); parent == nil {
return consensus.ErrUnknownAncestor
diff --git a/core/types.go b/core/types.go
index 04a787b1e..8369f2328 100644
--- a/core/types.go
+++ b/core/types.go
@@ -39,6 +39,10 @@ type Validator interface {
ValidateWitnessData(height uint64, data common.Hash) error
}
+type HeaderValidator interface {
+ ValidateWitnessData(height uint64, data common.Hash) 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