Refactor slot status notification to decouple from accounts notifications (#21308)
Problem Slot status can be used of in other scenarios in addition to account information such as transactions, blocks. The current implementation is too tightly coupled. Summary of Changes Decouple the slot status notification from accounts notification. Created a new slot status notification module.
This commit is contained in:
@ -414,6 +414,17 @@ impl Validator {
|
||||
|
||||
let accounts_package_channel = channel();
|
||||
|
||||
let accounts_update_notifier =
|
||||
accountsdb_plugin_service
|
||||
.as_ref()
|
||||
.and_then(|accountsdb_plugin_service| {
|
||||
accountsdb_plugin_service.get_accounts_update_notifier()
|
||||
});
|
||||
info!(
|
||||
"AccountsDb plugin: accounts_update_notifier: {}",
|
||||
accounts_update_notifier.is_some()
|
||||
);
|
||||
|
||||
let (
|
||||
genesis_config,
|
||||
bank_forks,
|
||||
@ -444,9 +455,7 @@ impl Validator {
|
||||
&start_progress,
|
||||
config.no_poh_speed_test,
|
||||
accounts_package_channel.0.clone(),
|
||||
accountsdb_plugin_service
|
||||
.as_ref()
|
||||
.map(|plugin_service| plugin_service.get_accounts_update_notifier()),
|
||||
accounts_update_notifier,
|
||||
);
|
||||
|
||||
*start_progress.write().unwrap() = ValidatorStartProgress::StartingServices;
|
||||
|
Reference in New Issue
Block a user