fix comment re: proto

This commit is contained in:
Danny Ryan 2019-10-18 12:05:43 +09:00
parent 437a65d3e1
commit fbcc2a4870
No known key found for this signature in database
GPG Key ID: 2765A792E42CE07A
2 changed files with 5 additions and 5 deletions

View File

@ -106,8 +106,8 @@ This document describes the shard transition function (data layer only) and the
### `Crosslink`
```python
# Crosslink is a placeholder to appease the build script until phase 1 is reworked
class Crosslink(Container):
# STUB: placeholder data structure while reworking phase 0
shard: Shard
```

View File

@ -14,7 +14,7 @@ def sign_block(spec, state, block, proposer_index=None):
if block.slot == state.slot:
proposer_index = spec.get_beacon_proposer_index(state)
else:
if spec.compute_epoch_of_slot(state.slot) + 1 > spec.compute_epoch_of_slot(block.slot):
if spec.compute_epoch_at_slot(state.slot) + 1 > spec.compute_epoch_at_slot(block.slot):
print("warning: block slot far away, and no proposer index manually given."
" Signing block is slow due to transition for proposer index calculation.")
# use stub state to get proposer index of future slot
@ -26,10 +26,10 @@ def sign_block(spec, state, block, proposer_index=None):
block.body.randao_reveal = bls_sign(
privkey=privkey,
message_hash=hash_tree_root(spec.compute_epoch_of_slot(block.slot)),
message_hash=hash_tree_root(spec.compute_epoch_at_slot(block.slot)),
domain=spec.get_domain(
state,
message_epoch=spec.compute_epoch_of_slot(block.slot),
message_epoch=spec.compute_epoch_at_slot(block.slot),
domain_type=spec.DOMAIN_RANDAO,
)
)
@ -39,7 +39,7 @@ def sign_block(spec, state, block, proposer_index=None):
domain=spec.get_domain(
state,
spec.DOMAIN_BEACON_PROPOSER,
spec.compute_epoch_of_slot(block.slot)))
spec.compute_epoch_at_slot(block.slot)))
def apply_empty_block(spec, state):