Updated pseudocode for get_indexed_attestation (#3086)

This commit is contained in:
terence tsao 2019-07-27 14:47:32 -07:00 committed by GitHub
parent fc907261e9
commit ad82e84503
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -653,12 +653,12 @@ func ProcessAttestation(beaconState *pb.BeaconState, att *ethpb.Attestation) (*p
// ConvertToIndexed converts attestation to (almost) indexed-verifiable form. // ConvertToIndexed converts attestation to (almost) indexed-verifiable form.
// //
// Spec pseudocode definition: // Spec pseudocode definition:
// def convert_to_indexed(state: BeaconState, attestation: Attestation) -> IndexedAttestation: // def get_indexed_attestation(state: BeaconState, attestation: Attestation) -> IndexedAttestation:
// """ // """
// Convert ``attestation`` to (almost) indexed-verifiable form. // Return the indexed attestation corresponding to ``attestation``.
// """ // """
// attesting_indices = get_attesting_indices(state, attestation.data, attestation.aggregation_bitfield) // attesting_indices = get_attesting_indices(state, attestation.data, attestation.aggregation_bits)
// custody_bit_1_indices = get_attesting_indices(state, attestation.data, attestation.custody_bitfield) // custody_bit_1_indices = get_attesting_indices(state, attestation.data, attestation.custody_bits)
// assert custody_bit_1_indices.issubset(attesting_indices) // assert custody_bit_1_indices.issubset(attesting_indices)
// custody_bit_0_indices = attesting_indices.difference(custody_bit_1_indices) // custody_bit_0_indices = attesting_indices.difference(custody_bit_1_indices)
// //