Refactor shard_state_transition

This commit is contained in:
Hsiao-Wei Wang 2020-10-15 16:14:01 +08:00
parent 7fb9226ec6
commit f1e4b3c88b
No known key found for this signature in database
GPG Key ID: 95B070122902DEA4
1 changed files with 1 additions and 2 deletions

View File

@ -72,14 +72,13 @@ The post-state corresponding to a pre-state `shard_state` and a signed block `si
def shard_state_transition(shard_state: ShardState,
signed_block: SignedShardBlock,
beacon_parent_state: BeaconState,
validate_result: bool = True) -> ShardState:
validate_result: bool = True) -> None:
assert verify_shard_block_message(beacon_parent_state, shard_state, signed_block.message)
if validate_result:
assert verify_shard_block_signature(beacon_parent_state, signed_block)
process_shard_block(shard_state, signed_block.message)
return shard_state
```
```python