Skip to content
This repository has been archived by the owner on Jul 1, 2021. It is now read-only.

Commit

Permalink
make a proper crosslink in the mock attestation utility
Browse files Browse the repository at this point in the history
  • Loading branch information
ralexstokes committed Jul 2, 2019
1 parent 85819bc commit e6e6d01
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions eth2/beacon/tools/builder/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,15 +642,20 @@ def create_signed_attestation_at_slot(state: BeaconState,

target_root = _get_target_root(state, config, beacon_block_root)

previous_crosslink = state.previous_crosslinks[shard]
parent_crosslink = state.current_crosslinks[shard]

attestation_data = AttestationData(
beacon_block_root=beacon_block_root,
source_epoch=state.current_justified_epoch,
source_root=state.current_justified_root,
target_root=target_root,
target_epoch=target_epoch,
crosslink=previous_crosslink,
crosslink=Crosslink(
shard=shard,
parent_root=parent_crosslink.root,
start_epoch=parent_crosslink.end_epoch,
end_epoch=target_epoch,
)
)

return _create_mock_signed_attestation(
Expand Down

0 comments on commit e6e6d01

Please sign in to comment.