This commit is contained in:
Hsiao-Wei Wang 2020-05-30 03:56:56 +08:00
parent 79b1b4bdbe
commit 870ad8b921
No known key found for this signature in database
GPG Key ID: 95B070122902DEA4
1 changed files with 3 additions and 4 deletions

View File

@ -30,6 +30,7 @@ def run_apply_shard_and_beacon(spec, state, store, shard_store, committee_index)
# Create SignedShardBlock # Create SignedShardBlock
body = b'\x56' * spec.MAX_SHARD_BLOCK_SIZE body = b'\x56' * spec.MAX_SHARD_BLOCK_SIZE
target_len_offset_slot = 1
shard_block = build_shard_block(spec, state, shard, body=body, signed=True) shard_block = build_shard_block(spec, state, shard, body=body, signed=True)
shard_blocks = [shard_block] shard_blocks = [shard_block]
@ -38,17 +39,15 @@ def run_apply_shard_and_beacon(spec, state, store, shard_store, committee_index)
shard_transitions = build_shard_transitions_till_slot( shard_transitions = build_shard_transitions_till_slot(
spec, spec,
state, state,
shards=[shard, ],
shard_blocks={shard: shard_blocks}, shard_blocks={shard: shard_blocks},
target_len_offset_slot=1, on_time_slot=state.slot + target_len_offset_slot,
) )
shard_transition = shard_transitions[shard] shard_transition = shard_transitions[shard]
attestation = build_attestation_with_shard_transition( attestation = build_attestation_with_shard_transition(
spec, spec,
state, state,
slot=state.slot,
index=committee_index, index=committee_index,
target_len_offset_slot=1, on_time_slot=state.slot + target_len_offset_slot,
shard_transition=shard_transition, shard_transition=shard_transition,
) )