mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-31 13:17:09 +00:00
More progress
This commit is contained in:
@@ -3623,10 +3623,7 @@ pub fn serve<T: BeaconChainTypes>(
|
||||
let subscriptions: std::collections::BTreeSet<_> = subscriptions
|
||||
.iter()
|
||||
.map(|subscription| {
|
||||
chain
|
||||
.validator_monitor
|
||||
.write()
|
||||
.auto_register_local_validator(subscription.validator_index);
|
||||
chain.register_local_validator(subscription.validator_index);
|
||||
api_types::ValidatorSubscription {
|
||||
attestation_committee_index: subscription.committee_index,
|
||||
slot: subscription.slot,
|
||||
@@ -3789,6 +3786,11 @@ pub fn serve<T: BeaconChainTypes>(
|
||||
})
|
||||
.unzip();
|
||||
|
||||
// Update the network about registered validators
|
||||
for (r, _) in &preparation_data {
|
||||
chain.register_local_validator(r.validator_index);
|
||||
}
|
||||
|
||||
// Update the prepare beacon proposer cache based on this request.
|
||||
execution_layer
|
||||
.update_proposer_preparation(
|
||||
@@ -3901,10 +3903,7 @@ pub fn serve<T: BeaconChainTypes>(
|
||||
| {
|
||||
task_spawner.blocking_json_task(Priority::P0, move || {
|
||||
for subscription in subscriptions {
|
||||
chain
|
||||
.validator_monitor
|
||||
.write()
|
||||
.auto_register_local_validator(subscription.validator_index);
|
||||
chain.register_local_validator(subscription.validator_index);
|
||||
|
||||
let message = ValidatorSubscriptionMessage::SyncCommitteeSubscribe {
|
||||
subscriptions: vec![subscription],
|
||||
|
||||
@@ -14,7 +14,7 @@ use lighthouse_network::{
|
||||
behaviour::{ConnectionEstablished, FromSwarm},
|
||||
ConnectionId, NetworkBehaviour,
|
||||
},
|
||||
types::{CGCUpdates, SyncState},
|
||||
types::SyncState,
|
||||
ConnectedPoint, Enr, NetworkConfig, NetworkGlobals, PeerId, PeerManager,
|
||||
};
|
||||
use network::{NetworkReceivers, NetworkSenders};
|
||||
@@ -25,7 +25,7 @@ use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
use store::MemoryStore;
|
||||
use task_executor::test_utils::TestRuntime;
|
||||
use types::{ChainSpec, EthSpec};
|
||||
use types::{CGCUpdates, ChainSpec, EthSpec};
|
||||
|
||||
pub const TCP_PORT: u16 = 42;
|
||||
pub const UDP_PORT: u16 = 42;
|
||||
|
||||
Reference in New Issue
Block a user