Skip to content

Commit

Permalink
FEAT: Extend sov header interface
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusmihaic committed Jun 18, 2024
1 parent cd91b61 commit 94cf0ab
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions data/block/sovereignChainHeader.go
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,16 @@ func (sch *SovereignChainHeader) SetBlockBodyTypeInt32(blockBodyType int32) erro
return sch.Header.SetBlockBodyTypeInt32(blockBodyType)
}

// SetEpochStartHash sets the epoch start block hash
func (sch *SovereignChainHeader) SetEpochStartHash(hash []byte) error {
if sch == nil {
return data.ErrNilPointerReceiver
}

sch.EpochStartHeaderHash = hash
return nil
}

// SetHash returns the hash
func (omb *OutGoingMiniBlockHeader) SetHash(hash []byte) error {
if omb == nil {
Expand Down
2 changes: 2 additions & 0 deletions data/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ type SovereignChainHeaderHandler interface {
GetExtendedShardHeaderHashes() [][]byte
GetOutGoingMiniBlockHeaderHandler() OutGoingMiniBlockHeaderHandler
SetOutGoingMiniBlockHeaderHandler(mbHeader OutGoingMiniBlockHeaderHandler) error
SetEpochStartHeaderHash(hash []byte) error
GetEpochStartHeaderHash() []byte
}

// OutGoingMiniBlockHeaderHandler defines setters and getters for sovereign outgoing mini block header
Expand Down

0 comments on commit 94cf0ab

Please sign in to comment.