Skip to content

Commit

Permalink
Add mut support (paritytech#1232)
Browse files Browse the repository at this point in the history
  • Loading branch information
fewensa authored and bkchr committed Apr 10, 2024
1 parent 5beeb9b commit 26c5a35
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bridges/relays/messages/src/message_race_delivery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ where
nonces_queue_range: 0..maximal_source_queue_index + 1,
};

let strategy = EnforcementStrategy::new(self.relay_strategy.clone());
let mut strategy = EnforcementStrategy::new(self.relay_strategy.clone());
let range_end = strategy.decide(reference).await?;

let range_begin = source_queue[0].1.begin();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl RelayStrategy for AltruisticStrategy {
SourceClient: MessageLaneSourceClient<P>,
TargetClient: MessageLaneTargetClient<P>,
>(
&self,
&mut self,
_reference: &mut RelayReference<P, SourceClient, TargetClient>,
) -> bool {
true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl<Strategy: RelayStrategy> EnforcementStrategy<Strategy> {
SourceClient: MessageLaneSourceClient<P>,
TargetClient: MessageLaneTargetClient<P>,
>(
&self,
&mut self,
reference: RelayMessagesBatchReference<P, SourceClient, TargetClient>,
) -> Option<MessageNonce> {
let mut hard_selected_count = 0;
Expand Down
2 changes: 1 addition & 1 deletion bridges/relays/messages/src/relay_strategy/mix_strategy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl RelayStrategy for MixStrategy {
SourceClient: MessageLaneSourceClient<P>,
TargetClient: MessageLaneTargetClient<P>,
>(
&self,
&mut self,
reference: &mut RelayReference<P, SourceClient, TargetClient>,
) -> bool {
match self.relayer_mode {
Expand Down
2 changes: 1 addition & 1 deletion bridges/relays/messages/src/relay_strategy/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pub trait RelayStrategy: 'static + Clone + Send + Sync {
SourceClient: MessageLaneSourceClient<P>,
TargetClient: MessageLaneTargetClient<P>,
>(
&self,
&mut self,
reference: &mut RelayReference<P, SourceClient, TargetClient>,
) -> bool;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl RelayStrategy for RationalStrategy {
SourceClient: MessageLaneSourceClient<P>,
TargetClient: MessageLaneTargetClient<P>,
>(
&self,
&mut self,
reference: &mut RelayReference<P, SourceClient, TargetClient>,
) -> bool {
// technically, multiple confirmations will be delivered in a single transaction,
Expand Down

0 comments on commit 26c5a35

Please sign in to comment.