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:
@@ -52,4 +52,14 @@ impl AccountsDbPluginManager {
|
||||
drop(lib);
|
||||
}
|
||||
}
|
||||
|
||||
/// Check if there is any plugin interested in account data
|
||||
pub fn to_notify_account_data(&self) -> bool {
|
||||
for plugin in &self.plugins {
|
||||
if plugin.to_notify_account_data() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
false
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user