mirror of
https://github.com/logos-storage/nim-mysticeti.git
synced 2026-01-04 06:33:11 +00:00
29 lines
446 B
Nim
29 lines
446 B
Nim
import ../committee
|
|
import ../hashing
|
|
|
|
type BlockId*[Dependencies] = object
|
|
author: CommitteeMember
|
|
round: uint64
|
|
hash: Hash[Dependencies]
|
|
|
|
func new*(
|
|
T: type BlockId,
|
|
author: CommitteeMember,
|
|
round: uint64,
|
|
hash: Hash
|
|
): auto =
|
|
T(
|
|
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
|