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 db*: BeaconChainDB
func toHeader(b: BeaconBlock): BeaconBlockHeader = func toHeader(b: BeaconBlock): BeaconBlockHeader =
result.slot = b.slot BeaconBlockHeader(
result.parent_root = b.parent_root slot: b.slot,
result.state_root = b.state_root parent_root: b.parent_root,
result.randao_reveal = b.randao_reveal state_root: b.state_root,
result.eth1_data = b.eth1_data randao_reveal: b.randao_reveal,
result.signature = b.signature eth1_data : b.eth1_data,
result.body = hash_tree_root_final(b.body) signature: b.signature,
body: hash_tree_root_final(b.body)
)
proc fromHeader(b: var BeaconBlock, h: BeaconBlockHeader) = proc fromHeader(b: var BeaconBlock, h: BeaconBlockHeader) =
b.slot = h.slot b.slot = h.slot