Fix agg_pubkey initialization

This commit is contained in:
mratsim 2018-11-13 19:15:57 +01:00
parent 6a3c7d6aa5
commit b8a17522c0

View File

@ -63,8 +63,11 @@ func process_block*(active_state: ActiveState, crystallized_state: CrystallizedS
for attester_idx in attestation_indices.committee:
if attester_idx in attestation.attester_bitfield:
let validator = crystallized_state.validators[attester_idx]
if empty: agg_pubkey = validator.pubkey
else: agg_pubkey.combine(validator.pubkey)
if empty:
agg_pubkey = validator.pubkey
empty = false
else:
agg_pubkey.combine(validator.pubkey)
# Verify that aggregate_sig verifies using the group pubkey generated and hash((slot % CYCLE_LENGTH).to_bytes(8, 'big') + parent_hashes + shard_id + shard_block_hash) as the message.
var msg: array[32, byte]