Skip to content

Commit

Permalink
fixup! feat(offchain): implement the broker-listener for the authorit…
Browse files Browse the repository at this point in the history
…y-claimer
  • Loading branch information
marcelstanley committed Sep 26, 2023
1 parent 9ecb93b commit 21e7563
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions offchain/authority-claimer/src/claimer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -59,7 +59,7 @@ pub struct AbstractClaimer<
}

impl<B: BrokerListener, D: DuplicateChecker, T: TransactionSender>
AbstractClaimer<B, D, T>
DefaultClaimer<B, D, T>
{
pub fn new(
broker_listener: B,
Expand All @@ -75,7 +75,7 @@ impl<B: BrokerListener, D: DuplicateChecker, T: TransactionSender>
}

#[async_trait]
impl<B, D, T> Claimer for AbstractClaimer<B, D, T>
impl<B, D, T> Claimer for DefaultClaimer<B, D, T>
where
B: BrokerListener + Send + Sync + 'static,
D: DuplicateChecker + Send + Sync + 'static,
Expand Down
4 changes: 2 additions & 2 deletions offchain/authority-claimer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use tracing::trace;

use crate::{
checker::DefaultDuplicateChecker,
claimer::{AbstractClaimer, Claimer},
claimer::{Claimer, DefaultClaimer},
listener::DefaultBrokerListener,
metrics::AuthorityClaimerMetrics,
sender::DefaultTransactionSender,
Expand Down Expand Up @@ -53,7 +53,7 @@ pub async fn run(config: Config) -> Result<(), Box<dyn Error>> {
DefaultTransactionSender::new(dapp_metadata, metrics)?;

// Creating the claimer loop.
let claimer = AbstractClaimer::new(
let claimer = DefaultClaimer::new(
broker_listener,
duplicate_checker,
transaction_sender,
Expand Down

0 comments on commit 21e7563

Please sign in to comment.