From e645d6b5fa7490134c1b30d98ae29aaa4cb46f00 Mon Sep 17 00:00:00 2001 From: Hsiao-Wei Wang Date: Mon, 13 Apr 2020 18:23:01 +0800 Subject: [PATCH] Rename `build_empty_shard_block` to `build_shard_block` --- .../core/pyspec/eth2spec/test/helpers/shard_block.py | 12 ++++++------ .../block_processing/test_process_crosslink.py | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/core/pyspec/eth2spec/test/helpers/shard_block.py b/tests/core/pyspec/eth2spec/test/helpers/shard_block.py index 0cb8a3dfd..8f95cf73a 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/shard_block.py +++ b/tests/core/pyspec/eth2spec/test/helpers/shard_block.py @@ -15,12 +15,12 @@ def sign_shard_block(spec, beacon_state, shard, block, proposer_index=None): block.signature = bls.Sign(privkey, signing_root) -def build_empty_shard_block(spec, - beacon_state, - shard, - slot, - body=None, - signed=False): +def build_shard_block(spec, + beacon_state, + shard, + slot, + body=None, + signed=False): shard_state = beacon_state.shard_states[shard] if slot is None: slot = shard_state.slot diff --git a/tests/core/pyspec/eth2spec/test/phase_1/block_processing/test_process_crosslink.py b/tests/core/pyspec/eth2spec/test/phase_1/block_processing/test_process_crosslink.py index 1d5fe7c02..1585a1a45 100644 --- a/tests/core/pyspec/eth2spec/test/phase_1/block_processing/test_process_crosslink.py +++ b/tests/core/pyspec/eth2spec/test/phase_1/block_processing/test_process_crosslink.py @@ -9,7 +9,7 @@ from eth2spec.test.helpers.attestations import ( from eth2spec.test.helpers.crosslinks import ( run_crosslinks_processing, ) -from eth2spec.test.helpers.shard_block import build_empty_shard_block +from eth2spec.test.helpers.shard_block import build_shard_block from eth2spec.test.helpers.state import next_epoch, next_slot @@ -24,7 +24,7 @@ def test_basic_crosslinks(spec, state): committee_index = spec.CommitteeIndex(0) shard = spec.compute_shard_from_committee_index(state, committee_index, state.slot) - shard_block = build_empty_shard_block(spec, state, shard, body=b'\x12' * 10, slot=state.slot, signed=True) + shard_block = build_shard_block(spec, state, shard, body=b'\x12' * 10, slot=state.slot, signed=True) shard_blocks = [shard_block] next_slot(spec, state)