mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 21:01:02 +00:00
Add mut support (#1232)
This commit is contained in:
@@ -521,7 +521,7 @@ where
|
|||||||
nonces_queue_range: 0..maximal_source_queue_index + 1,
|
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_end = strategy.decide(reference).await?;
|
||||||
|
|
||||||
let range_begin = source_queue[0].1.begin();
|
let range_begin = source_queue[0].1.begin();
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ impl RelayStrategy for AltruisticStrategy {
|
|||||||
SourceClient: MessageLaneSourceClient<P>,
|
SourceClient: MessageLaneSourceClient<P>,
|
||||||
TargetClient: MessageLaneTargetClient<P>,
|
TargetClient: MessageLaneTargetClient<P>,
|
||||||
>(
|
>(
|
||||||
&self,
|
&mut self,
|
||||||
_reference: &mut RelayReference<P, SourceClient, TargetClient>,
|
_reference: &mut RelayReference<P, SourceClient, TargetClient>,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
true
|
true
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ impl<Strategy: RelayStrategy> EnforcementStrategy<Strategy> {
|
|||||||
SourceClient: MessageLaneSourceClient<P>,
|
SourceClient: MessageLaneSourceClient<P>,
|
||||||
TargetClient: MessageLaneTargetClient<P>,
|
TargetClient: MessageLaneTargetClient<P>,
|
||||||
>(
|
>(
|
||||||
&self,
|
&mut self,
|
||||||
reference: RelayMessagesBatchReference<P, SourceClient, TargetClient>,
|
reference: RelayMessagesBatchReference<P, SourceClient, TargetClient>,
|
||||||
) -> Option<MessageNonce> {
|
) -> Option<MessageNonce> {
|
||||||
let mut hard_selected_count = 0;
|
let mut hard_selected_count = 0;
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ impl RelayStrategy for MixStrategy {
|
|||||||
SourceClient: MessageLaneSourceClient<P>,
|
SourceClient: MessageLaneSourceClient<P>,
|
||||||
TargetClient: MessageLaneTargetClient<P>,
|
TargetClient: MessageLaneTargetClient<P>,
|
||||||
>(
|
>(
|
||||||
&self,
|
&mut self,
|
||||||
reference: &mut RelayReference<P, SourceClient, TargetClient>,
|
reference: &mut RelayReference<P, SourceClient, TargetClient>,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
match self.relayer_mode {
|
match self.relayer_mode {
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ pub trait RelayStrategy: 'static + Clone + Send + Sync {
|
|||||||
SourceClient: MessageLaneSourceClient<P>,
|
SourceClient: MessageLaneSourceClient<P>,
|
||||||
TargetClient: MessageLaneTargetClient<P>,
|
TargetClient: MessageLaneTargetClient<P>,
|
||||||
>(
|
>(
|
||||||
&self,
|
&mut self,
|
||||||
reference: &mut RelayReference<P, SourceClient, TargetClient>,
|
reference: &mut RelayReference<P, SourceClient, TargetClient>,
|
||||||
) -> bool;
|
) -> bool;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ impl RelayStrategy for RationalStrategy {
|
|||||||
SourceClient: MessageLaneSourceClient<P>,
|
SourceClient: MessageLaneSourceClient<P>,
|
||||||
TargetClient: MessageLaneTargetClient<P>,
|
TargetClient: MessageLaneTargetClient<P>,
|
||||||
>(
|
>(
|
||||||
&self,
|
&mut self,
|
||||||
reference: &mut RelayReference<P, SourceClient, TargetClient>,
|
reference: &mut RelayReference<P, SourceClient, TargetClient>,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
// technically, multiple confirmations will be delivered in a single transaction,
|
// technically, multiple confirmations will be delivered in a single transaction,
|
||||||
|
|||||||
Reference in New Issue
Block a user