From 292fd604f8f6073c891694fa3794c98634b9e6b4 Mon Sep 17 00:00:00 2001 From: Mikhail Kalinin Date: Wed, 14 Apr 2021 12:54:49 +0600 Subject: [PATCH] Replace boolean with bool whenever make sense --- specs/merge/beacon-chain.md | 6 +++--- specs/merge/fork-choice.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/specs/merge/beacon-chain.md b/specs/merge/beacon-chain.md index 028eb5b84..688f36b47 100644 --- a/specs/merge/beacon-chain.md +++ b/specs/merge/beacon-chain.md @@ -155,14 +155,14 @@ class ExecutionPayloadHeader(Container): #### `is_transition_completed` ```python -def is_transition_completed(state: BeaconState) -> boolean: +def is_transition_completed(state: BeaconState) -> bool: return state.latest_execution_payload_header != ExecutionPayloadHeader() ``` #### `is_transition_block` ```python -def is_transition_block(state: BeaconState, block_body: BeaconBlockBody) -> boolean: +def is_transition_block(state: BeaconState, block_body: BeaconBlockBody) -> bool: return not is_transition_completed(state) and block_body.execution_payload != ExecutionPayload() ``` @@ -191,7 +191,7 @@ def process_block(state: BeaconState, block: BeaconBlock) -> None: ##### `validate_execution_payload` -Let `validate_execution_payload(execution_payload: ExecutionPayload) -> boolean` be the function checking whether given `ExecutionPayload` is valid or not. +Let `validate_execution_payload(execution_payload: ExecutionPayload) -> bool` be the function checking whether given `ExecutionPayload` is valid or not. The body of the function is implementation dependent. ##### `process_execution_payload` diff --git a/specs/merge/fork-choice.md b/specs/merge/fork-choice.md index ae3917814..34647f45d 100644 --- a/specs/merge/fork-choice.md +++ b/specs/merge/fork-choice.md @@ -47,7 +47,7 @@ Let `get_pow_block(block_hash: Hash32) -> PowBlock` be the function that given t Used by fork-choice handler, `on_block`. ```python -def is_valid_transition_block(block: PowBlock) -> boolean: +def is_valid_transition_block(block: PowBlock) -> bool: is_total_difficulty_reached = block.total_difficulty >= TRANSITION_TOTAL_DIFFICULTY return block.is_valid and is_total_difficulty_reached ```