diff --git a/data/block/trigger.go b/data/block/trigger.go index c8b511e3..6d091e1e 100644 --- a/data/block/trigger.go +++ b/data/block/trigger.go @@ -191,3 +191,21 @@ func (strV2 *ShardTriggerRegistryV2) SetEpochStartHeaderHandler(epochStartHeader } return nil } + +// GetEpochStartHeaderHandler returns the epoch start header handler +func (m *MetaTriggerRegistry) GetEpochStartHeaderHandler() data.HeaderHandler { + if m == nil { + return nil + } + + return m.EpochStartMeta +} + +// GetEpochStartHeaderHandler returns the epoch start header handler +func (m *SovereignShardTriggerRegistry) GetEpochStartHeaderHandler() data.HeaderHandler { + if m == nil { + return nil + } + + return m.SovereignChainHeader +} diff --git a/data/interface.go b/data/interface.go index 9f72a9c6..30891e5a 100644 --- a/data/interface.go +++ b/data/interface.go @@ -29,6 +29,17 @@ type TriggerRegistryHandler interface { SetEpochStartHeaderHandler(epochStartHeaderHandler HeaderHandler) error } +// MetaTriggerRegistryHandler defines meta chain trigger registry interface +type MetaTriggerRegistryHandler interface { + GetEpoch() uint32 + GetCurrentRound() uint64 + GetEpochFinalityAttestingRound() uint64 + GetCurrEpochStartRound() uint64 + GetPrevEpochStartRound() uint64 + GetEpochStartMetaHash() []byte + GetEpochStartHeaderHandler() HeaderHandler +} + // CommonHeaderHandler defines getters and setters for header data holder type CommonHeaderHandler interface { GetShardID() uint32