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 Nov 30, 2021
1 parent 5290e7f commit fe7587d
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion 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
2 changes: 1 addition & 1 deletion relays/messages/src/relay_strategy/altruistic_strategy.rs
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
2 changes: 1 addition & 1 deletion relays/messages/src/relay_strategy/enforcement_strategy.rs
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 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 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
2 changes: 1 addition & 1 deletion relays/messages/src/relay_strategy/rational_strategy.rs
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 fe7587d

Please sign in to comment.