Comments addressed

This commit is contained in:
Yuriy Glukhov 2019-03-01 22:09:20 +02:00
parent bed6510da3
commit 4c31f50889
No known key found for this signature in database
GPG Key ID: 733560674BB43E6C
1 changed files with 9 additions and 7 deletions

View File

@ -19,13 +19,15 @@ type
db*: BeaconChainDB
func toHeader(b: BeaconBlock): BeaconBlockHeader =
result.slot = b.slot
result.parent_root = b.parent_root
result.state_root = b.state_root
result.randao_reveal = b.randao_reveal
result.eth1_data = b.eth1_data
result.signature = b.signature
result.body = hash_tree_root_final(b.body)
BeaconBlockHeader(
slot: b.slot,
parent_root: b.parent_root,
state_root: b.state_root,
randao_reveal: b.randao_reveal,
eth1_data : b.eth1_data,
signature: b.signature,
body: hash_tree_root_final(b.body)
)
proc fromHeader(b: var BeaconBlock, h: BeaconBlockHeader) =
b.slot = h.slot