Make empty pow_block hash generation Python 3.8 compatible
This commit is contained in:
parent
f8b3a67152
commit
deb4dbd9c8
|
@ -241,8 +241,8 @@ def apply_next_slots_with_attestations(spec,
|
||||||
|
|
||||||
def prepare_empty_pow_block(spec, rng=Random(3131)):
|
def prepare_empty_pow_block(spec, rng=Random(3131)):
|
||||||
return spec.PowBlock(
|
return spec.PowBlock(
|
||||||
block_hash=spec.Hash32(spec.hash(rng.randbytes(32))),
|
block_hash=spec.Hash32(spec.hash(bytearray(rng.getrandbits(8) for _ in range(32)))),
|
||||||
parent_hash=spec.Hash32(spec.hash(rng.randbytes(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)
|
difficulty=uint256(0)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue