Fix typo: it's bls_verify_multiple in verify_slashable_attestation (#574)

This commit is contained in:
Hsiao-Wei Wang 2019-02-06 01:11:00 +08:00 committed by Justin
parent ecad0212e8
commit e5788f5751

View File

@ -1137,7 +1137,7 @@ def verify_slashable_attestation(state: BeaconState, slashable_attestation: Slas
else: else:
custody_bit_1_indices.append(validator_index) custody_bit_1_indices.append(validator_index)
return bls_verify( return bls_verify_multiple(
pubkeys=[ pubkeys=[
bls_aggregate_pubkeys([state.validator_registry[i].pubkey for i in custody_bit_0_indices]), bls_aggregate_pubkeys([state.validator_registry[i].pubkey for i in custody_bit_0_indices]),
bls_aggregate_pubkeys([state.validator_registry[i].pubkey for i in custody_bit_1_indices]), bls_aggregate_pubkeys([state.validator_registry[i].pubkey for i in custody_bit_1_indices]),
@ -1147,11 +1147,7 @@ def verify_slashable_attestation(state: BeaconState, slashable_attestation: Slas
hash_tree_root(AttestationDataAndCustodyBit(data=slashable_attestation.data, custody_bit=0b1)), hash_tree_root(AttestationDataAndCustodyBit(data=slashable_attestation.data, custody_bit=0b1)),
], ],
signature=slashable_attestation.aggregate_signature, signature=slashable_attestation.aggregate_signature,
domain=get_domain( domain=get_domain(state.fork, slot_to_epoch(vote_data.data.slot), DOMAIN_ATTESTATION),
state.fork,
slot_to_epoch(vote_data.data.slot),
DOMAIN_ATTESTATION,
),
) )
``` ```