diff --git a/offchain/authority-claimer/src/claimer.rs b/offchain/authority-claimer/src/claimer.rs index 98872eb59..7e3596c5b 100644 --- a/offchain/authority-claimer/src/claimer.rs +++ b/offchain/authority-claimer/src/claimer.rs @@ -42,13 +42,13 @@ pub enum ClaimerError< } // ------------------------------------------------------------------------------------------------ -// AbstractClaimer +// DefaultClaimer // ------------------------------------------------------------------------------------------------ -/// The `AbstractClaimer` must be injected with a +/// The `DefaultClaimer` must be injected with a /// `BrokerListener`, a `DuplicateChecker` and a `TransactionSender`. #[derive(Debug)] -pub struct AbstractClaimer< +pub struct DefaultClaimer< B: BrokerListener, D: DuplicateChecker, T: TransactionSender, @@ -59,7 +59,7 @@ pub struct AbstractClaimer< } impl - AbstractClaimer + DefaultClaimer { pub fn new( broker_listener: B, @@ -75,7 +75,7 @@ impl } #[async_trait] -impl Claimer for AbstractClaimer +impl Claimer for DefaultClaimer where B: BrokerListener + Send + Sync + 'static, D: DuplicateChecker + Send + Sync + 'static, diff --git a/offchain/authority-claimer/src/lib.rs b/offchain/authority-claimer/src/lib.rs index fc62bec53..21cd432c9 100644 --- a/offchain/authority-claimer/src/lib.rs +++ b/offchain/authority-claimer/src/lib.rs @@ -18,7 +18,7 @@ use tracing::trace; use crate::{ checker::DefaultDuplicateChecker, - claimer::{AbstractClaimer, Claimer}, + claimer::{Claimer, DefaultClaimer}, listener::DefaultBrokerListener, metrics::AuthorityClaimerMetrics, sender::DefaultTransactionSender, @@ -53,7 +53,7 @@ pub async fn run(config: Config) -> Result<(), Box> { DefaultTransactionSender::new(dapp_metadata, metrics)?; // Creating the claimer loop. - let claimer = AbstractClaimer::new( + let claimer = DefaultClaimer::new( broker_listener, duplicate_checker, transaction_sender,