From 72d00e33b83fed8122c0f09db9cfa94bed3a26f0 Mon Sep 17 00:00:00 2001 From: tersec Date: Mon, 7 Dec 2020 20:32:34 +0100 Subject: [PATCH] always wait for 2/3 into slot for aggregate attestations (#2158) --- beacon_chain/validator_duties.nim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/beacon_chain/validator_duties.nim b/beacon_chain/validator_duties.nim index 71350791b..65dc7d2ff 100644 --- a/beacon_chain/validator_duties.nim +++ b/beacon_chain/validator_duties.nim @@ -23,6 +23,7 @@ import conf, time, validator_pool, attestation_pool, exit_pool, block_pools/[spec_cache, chain_dag, clearance], eth2_network, keystore_management, beacon_node_common, beacon_node_types, + nimbus_binary_common, eth1_monitor, version, ssz/merkleization, attestation_aggregation, sync_manager, sszdump, validator_slashing_protection @@ -679,8 +680,8 @@ proc handleValidatorDuties*(node: BeaconNode, lastSlot, slot: Slot) {.async.} = # through the slot-that is, SECONDS_PER_SLOT * 2 / 3 seconds after the start # of slot. if slot > 2: - sleepToSlotOffsetWithHeadUpdate( - seconds(int64(SECONDS_PER_SLOT * 2) div 3), + discard await node.beaconClock.sleepToSlotOffset( + seconds(int64(SECONDS_PER_SLOT * 2) div 3), slot, "Waiting to aggregate attestations") let aggregationHead = get_ancestor(head, slot)