diff options
Diffstat (limited to 'core/types/block.go')
-rw-r--r-- | core/types/block.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/types/block.go b/core/types/block.go index 710da9b..bf27934 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -118,6 +118,11 @@ func (b *Block) IsGenesis() bool { return b.Position.Height == 0 && b.ParentHash == common.Hash{} } +// IsFinalized checks if the finalization data is ready. +func (b *Block) IsFinalized() bool { + return b.Finalization.Height != 0 +} + // IsAcking checks if a block acking another by it's hash. func (b *Block) IsAcking(hash common.Hash) bool { idx := sort.Search(len(b.Acks), func(i int) bool { |