mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-21 13:54:44 +00:00
Subscribe to subnets only when needed (#3419)
## Issue Addressed We currently subscribe to attestation subnets as soon as the subscription arrives (one epoch in advance), this makes it so that subscriptions for future slots are scheduled instead of done immediately. ## Proposed Changes - Schedule subscriptions to subnets for future slots. - Finish removing hashmap_delay, in favor of [delay_map](https://github.com/AgeManning/delay_map). This was the only remaining service to do this. - Subscriptions for past slots are rejected, before we would subscribe for one slot. - Add a new test for subscriptions that are not consecutive. ## Additional Info This is also an effort in making the code easier to understand
This commit is contained in:
@@ -12,7 +12,7 @@ use slog::{debug, error, o, trace, warn};
|
||||
|
||||
use super::SubnetServiceMessage;
|
||||
use beacon_chain::{BeaconChain, BeaconChainTypes};
|
||||
use hashset_delay::HashSetDelay;
|
||||
use delay_map::HashSetDelay;
|
||||
use lighthouse_network::{NetworkConfig, Subnet, SubnetDiscovery};
|
||||
use slot_clock::SlotClock;
|
||||
use types::{Epoch, EthSpec, SyncCommitteeSubscription, SyncSubnetId};
|
||||
|
||||
Reference in New Issue
Block a user