github.com/unicornultrafoundation/go-u2u@v1.0.0-rc1.0.20240205080301-e74a83d3fadc/native/ier/native_epoch_records.go (about)

     1  package ier
     2  
     3  import (
     4  	"github.com/unicornultrafoundation/go-helios/hash"
     5  	"github.com/unicornultrafoundation/go-helios/native/idx"
     6  
     7  	"github.com/unicornultrafoundation/go-u2u/native/iblockproc"
     8  )
     9  
    10  type LlrFullEpochRecord struct {
    11  	BlockState iblockproc.BlockState
    12  	EpochState iblockproc.EpochState
    13  }
    14  
    15  type LlrIdxFullEpochRecord struct {
    16  	LlrFullEpochRecord
    17  	Idx idx.Epoch
    18  }
    19  
    20  func (er LlrFullEpochRecord) Hash() hash.Hash {
    21  	return hash.Of(er.BlockState.Hash().Bytes(), er.EpochState.Hash().Bytes())
    22  }