Skip to content

Commit

Permalink
Add vote_accounts_to_monitor to replica_node
Browse files Browse the repository at this point in the history
  • Loading branch information
enriquefynn committed Aug 23, 2022
1 parent 2f141a4 commit 0da515f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions local-cluster/src/validator_configs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ pub fn safe_clone_config(config: &ValidatorConfig) -> ValidatorConfig {
wait_to_vote_slot: config.wait_to_vote_slot,
ledger_column_options: config.ledger_column_options.clone(),
enable_quic_servers: config.enable_quic_servers,
vote_accounts_to_monitor: config.vote_accounts_to_monitor.clone(),
}
}

Expand Down
1 change: 1 addition & 0 deletions replica-node/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@ pub fn main() {
account_indexes: AccountSecondaryIndexes::default(),
accounts_db_caching_enabled: false,
replica_exit: Arc::new(RwLock::new(Exit::default())),
vote_accounts_to_monitor: Arc::new(HashSet::default()),
};

let replica = ReplicaNode::new(config);
Expand Down
6 changes: 6 additions & 0 deletions replica-node/src/replica_node.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
use std::collections::HashSet;

use solana_sdk::pubkey::Pubkey;

use {
crate::accountsdb_repl_service::AccountsDbReplService,
crossbeam_channel::unbounded,
Expand Down Expand Up @@ -58,6 +62,7 @@ pub struct ReplicaNodeConfig {
pub accounts_db_caching_enabled: bool,
pub replica_exit: Arc<RwLock<Exit>>,
pub socket_addr_space: SocketAddrSpace,
pub vote_accounts_to_monitor: Arc<HashSet<Pubkey>>,
}

pub struct ReplicaNode {
Expand Down Expand Up @@ -251,6 +256,7 @@ fn start_client_rpc_services(
leader_schedule_cache.clone(),
connection_cache,
max_complete_transaction_status_slot,
replica_config.vote_accounts_to_monitor.clone(),
)),
Some(pubsub_service),
Some(OptimisticallyConfirmedBankTracker::new(
Expand Down

0 comments on commit 0da515f

Please sign in to comment.