Accountsdb plugin transaction part 3: Transaction Notifier (#21374)

The TransactionNotifierInterface interface for notifying transactions.
Changes to transaction_status_service to notify the notifier of the transaction data.
Interface to query the plugin's interest in transaction data
This commit is contained in:
Lijun Wang
2021-11-23 09:55:53 -08:00
committed by GitHub
parent 2602e7c3bc
commit c29838fce1
15 changed files with 481 additions and 48 deletions

View File

@@ -54,9 +54,19 @@ impl AccountsDbPluginManager {
}
/// Check if there is any plugin interested in account data
pub fn to_notify_account_data(&self) -> bool {
pub fn account_data_notifications_enabled(&self) -> bool {
for plugin in &self.plugins {
if plugin.to_notify_account_data() {
if plugin.account_data_notifications_enabled() {
return true;
}
}
false
}
/// Check if there is any plugin interested in transaction data
pub fn transaction_notifications_enabled(&self) -> bool {
for plugin in &self.plugins {
if plugin.transaction_notifications_enabled() {
return true;
}
}