pr feedback

This commit is contained in:
Danny Ryan
2019-04-24 11:31:24 -06:00
parent b1e1510e21
commit 20d65e040b
4 changed files with 19 additions and 15 deletions

View File

@@ -9,7 +9,6 @@ from eth2spec.utils.minimal_ssz import signing_root
from eth2spec.phase0.spec import (
# constants
ZERO_HASH,
SLOTS_PER_HISTORICAL_ROOT,
# SSZ
Deposit,
Transfer,
@@ -17,13 +16,12 @@ from eth2spec.phase0.spec import (
# functions
get_active_validator_indices,
get_beacon_proposer_index,
get_block_root,
get_block_root_at_slot,
get_state_root,
get_current_epoch,
get_domain,
advance_slot,
cache_state,
slot_to_epoch,
verify_merkle_branch,
hash,
)
@@ -49,13 +47,6 @@ from .helpers import (
)
def get_state_root(state, slot) -> bytes:
"""
Return the state root at a recent ``slot``.
"""
assert slot < state.slot <= slot + SLOTS_PER_HISTORICAL_ROOT
return state.latest_state_roots[slot % SLOTS_PER_HISTORICAL_ROOT]
# mark entire file as 'sanity'
pytestmark = pytest.mark.sanity