Merge pull request #2720 from paulhauner/patch-34

Remove `difficulty` from `PowBlock`
This commit is contained in:
Danny Ryan 2021-11-18 15:49:27 -07:00 committed by GitHub
commit dc14b79a52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 3 deletions

View File

@ -511,7 +511,7 @@ ExecutionState = Any
def get_pow_block(hash: Bytes32) -> Optional[PowBlock]: 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: def get_execution_state(execution_state_root: Bytes32) -> ExecutionState:

View File

@ -87,7 +87,6 @@ class PowBlock(Container):
block_hash: Hash32 block_hash: Hash32
parent_hash: Hash32 parent_hash: Hash32
total_difficulty: uint256 total_difficulty: uint256
difficulty: uint256
``` ```
### `get_pow_block` ### `get_pow_block`

View File

@ -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)))), 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)))), parent_hash=spec.Hash32(spec.hash(bytearray(rng.getrandbits(8) for _ in range(32)))),
total_difficulty=uint256(0), total_difficulty=uint256(0),
difficulty=uint256(0)
) )