mirror of
https://github.com/logos-storage/nim-mysticeti.git
synced 2026-01-04 06:33:11 +00:00
28 lines
424 B
Nim
28 lines
424 B
Nim
import ../committee
|
|
|
|
type BlockId*[Hash] = object
|
|
author: CommitteeMember
|
|
round: uint64
|
|
hash: Hash
|
|
|
|
func new*[Hash](
|
|
_: type BlockId,
|
|
author: CommitteeMember,
|
|
round: uint64,
|
|
hash: Hash
|
|
): auto =
|
|
BlockId[Hash](
|
|
author: author,
|
|
round: round,
|
|
hash: hash
|
|
)
|
|
|
|
func author*(id: BlockId): auto =
|
|
id.author
|
|
|
|
func round*(id: BlockId): uint64 =
|
|
id.round
|
|
|
|
func hash*(blck: BlockId): auto =
|
|
blck.hash
|