mirror of
https://github.com/logos-storage/logos-storage-nim-validator.git
synced 2026-01-03 14:03:07 +00:00
23 lines
459 B
Nim
23 lines
459 B
Nim
from pkg/mysticeti import CommitteeMember, `==`, `$`
|
|
import ../basics
|
|
import ../transaction
|
|
import ../hashing
|
|
import ./blockid
|
|
|
|
export mysticeti.CommitteeMember
|
|
export mysticeti.`==`
|
|
export mysticeti.`$`
|
|
|
|
type Block* = ref object
|
|
author*: CommitteeMember
|
|
round*: uint64
|
|
parents*: seq[BlockId]
|
|
transactions*: seq[Transaction]
|
|
hash: ?Hash
|
|
|
|
func `hash=`*(blck: Block, hash: Hash) =
|
|
blck.hash = some hash
|
|
|
|
func hash*(blck: Block): ?Hash =
|
|
blck.hash
|