From 76893cafaadb2610fdc171f07fe2cba58bdca132 Mon Sep 17 00:00:00 2001 From: Justin Date: Wed, 3 Apr 2019 23:22:27 +0400 Subject: [PATCH 1/2] Missing typehint for `convert_to_indexed` And some minor cleanups --- specs/core/0_beacon-chain.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index 70c5b67f6d..3a2bb39033 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -1160,9 +1160,9 @@ def verify_bitfield(bitfield: bytes, committee_size: int) -> bool: ### `convert_to_indexed` ```python -def convert_to_indexed(state: BeaconState, attestation: Attestation): +def convert_to_indexed(state: BeaconState, attestation: Attestation) -> IndexedAttestation: """ - Convert an attestation to (almost) indexed-verifiable form + Convert an ``attestation`` to (almost) indexed-verifiable form. """ attesting_indices = get_attestation_participants(state, attestation.data, attestation.aggregation_bitfield) custody_bit_1_indices = get_attestation_participants(state, attestation.data, attestation.custody_bitfield) @@ -1172,7 +1172,7 @@ def convert_to_indexed(state: BeaconState, attestation: Attestation): custody_bit_0_indices=custody_bit_0_indices, custody_bit_1_indices=custody_bit_1_indices, data=attestation.data, - aggregate_signature=attestation.aggregate_signature + aggregate_signature=attestation.aggregate_signature, ) ``` From 6ca3c64526a1683aa72866d6b6f7a210cbea399f Mon Sep 17 00:00:00 2001 From: Justin Date: Wed, 3 Apr 2019 23:24:46 +0400 Subject: [PATCH 2/2] Update 0_beacon-chain.md --- specs/core/0_beacon-chain.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index 3a2bb39033..9bec7841fc 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -1162,7 +1162,7 @@ def verify_bitfield(bitfield: bytes, committee_size: int) -> bool: ```python def convert_to_indexed(state: BeaconState, attestation: Attestation) -> IndexedAttestation: """ - Convert an ``attestation`` to (almost) indexed-verifiable form. + Convert ``attestation`` to (almost) indexed-verifiable form. """ attesting_indices = get_attestation_participants(state, attestation.data, attestation.aggregation_bitfield) custody_bit_1_indices = get_attestation_participants(state, attestation.data, attestation.custody_bitfield)