From 16aaf74cfc368bc4a29d6b6e7a2b34f5dbba1da0 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Tue, 16 Nov 2021 10:28:04 +1100 Subject: [PATCH 1/2] Remove `difficulty` from `PowBlock` --- specs/merge/fork-choice.md | 1 - 1 file changed, 1 deletion(-) diff --git a/specs/merge/fork-choice.md b/specs/merge/fork-choice.md index 3f0c67200..dec273853 100644 --- a/specs/merge/fork-choice.md +++ b/specs/merge/fork-choice.md @@ -87,7 +87,6 @@ class PowBlock(Container): block_hash: Hash32 parent_hash: Hash32 total_difficulty: uint256 - difficulty: uint256 ``` ### `get_pow_block` From 79f1f16adf4fc7f1c621a8bbe1471dd06430ccb3 Mon Sep 17 00:00:00 2001 From: Hsiao-Wei Wang Date: Tue, 16 Nov 2021 22:08:00 +0800 Subject: [PATCH 2/2] Clean `PowBlock.difficulty` leftover --- setup.py | 2 +- tests/core/pyspec/eth2spec/test/helpers/pow_block.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 355f6e2c1..0ced87be2 100644 --- a/setup.py +++ b/setup.py @@ -511,7 +511,7 @@ ExecutionState = Any def get_pow_block(hash: Bytes32) -> Optional[PowBlock]: - return PowBlock(block_hash=hash, parent_hash=Bytes32(), total_difficulty=uint256(0), difficulty=uint256(0)) + return PowBlock(block_hash=hash, parent_hash=Bytes32(), total_difficulty=uint256(0)) def get_execution_state(execution_state_root: Bytes32) -> ExecutionState: diff --git a/tests/core/pyspec/eth2spec/test/helpers/pow_block.py b/tests/core/pyspec/eth2spec/test/helpers/pow_block.py index 58989a420..939360e93 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/pow_block.py +++ b/tests/core/pyspec/eth2spec/test/helpers/pow_block.py @@ -21,7 +21,6 @@ def prepare_random_pow_block(spec, rng=Random(3131)): block_hash=spec.Hash32(spec.hash(bytearray(rng.getrandbits(8) for _ in range(32)))), parent_hash=spec.Hash32(spec.hash(bytearray(rng.getrandbits(8) for _ in range(32)))), total_difficulty=uint256(0), - difficulty=uint256(0) )