Skip to content

Commit 988f6b1

Browse files
svyatonikbkchr
authored andcommitted
remove OutboundLaneApi::latest_received_nonce (#1262)
1 parent 13a3974 commit 988f6b1

File tree

17 files changed

+9
-64
lines changed

17 files changed

+9
-64
lines changed

bridges/bin/millau/runtime/src/lib.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -764,10 +764,6 @@ impl_runtime_apis! {
764764
WithRialtoMessageBridge,
765765
>(lane, begin, end)
766766
}
767-
768-
fn latest_received_nonce(lane: bp_messages::LaneId) -> bp_messages::MessageNonce {
769-
BridgeRialtoMessages::outbound_latest_received_nonce(lane)
770-
}
771767
}
772768

773769
impl bp_rialto::FromRialtoInboundLaneApi<Block> for Runtime {

bridges/bin/rialto/runtime/src/lib.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -912,10 +912,6 @@ impl_runtime_apis! {
912912
WithMillauMessageBridge,
913913
>(lane, begin, end)
914914
}
915-
916-
fn latest_received_nonce(lane: bp_messages::LaneId) -> bp_messages::MessageNonce {
917-
BridgeMillauMessages::outbound_latest_received_nonce(lane)
918-
}
919915
}
920916

921917
impl bp_millau::FromMillauInboundLaneApi<Block> for Runtime {

bridges/modules/messages/src/lib.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -769,11 +769,6 @@ pub mod pallet {
769769
OutboundLanes::<T, I>::get(&lane).latest_generated_nonce
770770
}
771771

772-
/// Get nonce of the latest confirmed message at given outbound lane.
773-
pub fn outbound_latest_received_nonce(lane: LaneId) -> MessageNonce {
774-
OutboundLanes::<T, I>::get(&lane).latest_received_nonce
775-
}
776-
777772
/// Get nonce of the latest received message at given inbound lane.
778773
pub fn inbound_latest_received_nonce(lane: LaneId) -> MessageNonce {
779774
InboundLanes::<T, I>::get(&lane).last_delivered_nonce()

bridges/primitives/chain-kusama/src/lib.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,6 @@ pub const TO_KUSAMA_ESTIMATE_MESSAGE_FEE_METHOD: &str =
9898
"ToKusamaOutboundLaneApi_estimate_message_delivery_and_dispatch_fee";
9999
/// Name of the `ToKusamaOutboundLaneApi::message_details` runtime method.
100100
pub const TO_KUSAMA_MESSAGE_DETAILS_METHOD: &str = "ToKusamaOutboundLaneApi_message_details";
101-
/// Name of the `ToKusamaOutboundLaneApi::latest_received_nonce` runtime method.
102-
pub const TO_KUSAMA_LATEST_RECEIVED_NONCE_METHOD: &str =
103-
"ToKusamaOutboundLaneApi_latest_received_nonce";
104101

105102
/// Name of the `FromKusamaInboundLaneApi::latest_received_nonce` runtime method.
106103
pub const FROM_KUSAMA_LATEST_RECEIVED_NONCE_METHOD: &str =
@@ -151,8 +148,6 @@ sp_api::decl_runtime_apis! {
151148
begin: MessageNonce,
152149
end: MessageNonce,
153150
) -> Vec<MessageDetails<OutboundMessageFee>>;
154-
/// Returns nonce of the latest message, received by bridged chain.
155-
fn latest_received_nonce(lane: LaneId) -> MessageNonce;
156151
}
157152

158153
/// Inbound message lane API for messages sent by Kusama chain.

bridges/primitives/chain-millau/src/lib.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,6 @@ pub const TO_MILLAU_ESTIMATE_MESSAGE_FEE_METHOD: &str =
275275
"ToMillauOutboundLaneApi_estimate_message_delivery_and_dispatch_fee";
276276
/// Name of the `ToMillauOutboundLaneApi::message_details` runtime method.
277277
pub const TO_MILLAU_MESSAGE_DETAILS_METHOD: &str = "ToMillauOutboundLaneApi_message_details";
278-
/// Name of the `ToMillauOutboundLaneApi::latest_received_nonce` runtime method.
279-
pub const TO_MILLAU_LATEST_RECEIVED_NONCE_METHOD: &str =
280-
"ToMillauOutboundLaneApi_latest_received_nonce";
281278

282279
/// Name of the `FromMillauInboundLaneApi::latest_received_nonce` runtime method.
283280
pub const FROM_MILLAU_LATEST_RECEIVED_NONCE_METHOD: &str =
@@ -328,8 +325,6 @@ sp_api::decl_runtime_apis! {
328325
begin: MessageNonce,
329326
end: MessageNonce,
330327
) -> Vec<MessageDetails<OutboundMessageFee>>;
331-
/// Returns nonce of the latest message, received by bridged chain.
332-
fn latest_received_nonce(lane: LaneId) -> MessageNonce;
333328
}
334329

335330
/// Inbound message lane API for messages sent by Millau chain.

bridges/primitives/chain-polkadot/src/lib.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,6 @@ pub const TO_POLKADOT_ESTIMATE_MESSAGE_FEE_METHOD: &str =
9898
"ToPolkadotOutboundLaneApi_estimate_message_delivery_and_dispatch_fee";
9999
/// Name of the `ToPolkadotOutboundLaneApi::message_details` runtime method.
100100
pub const TO_POLKADOT_MESSAGE_DETAILS_METHOD: &str = "ToPolkadotOutboundLaneApi_message_details";
101-
/// Name of the `ToPolkadotOutboundLaneApi::latest_received_nonce` runtime method.
102-
pub const TO_POLKADOT_LATEST_RECEIVED_NONCE_METHOD: &str =
103-
"ToPolkadotOutboundLaneApi_latest_received_nonce";
104101

105102
/// Name of the `FromPolkadotInboundLaneApi::latest_received_nonce` runtime method.
106103
pub const FROM_POLKADOT_LATEST_RECEIVED_NONCE_METHOD: &str =
@@ -151,8 +148,6 @@ sp_api::decl_runtime_apis! {
151148
begin: MessageNonce,
152149
end: MessageNonce,
153150
) -> Vec<MessageDetails<OutboundMessageFee>>;
154-
/// Returns nonce of the latest message, received by bridged chain.
155-
fn latest_received_nonce(lane: LaneId) -> MessageNonce;
156151
}
157152

158153
/// Inbound message lane API for messages sent by Polkadot chain.

bridges/primitives/chain-rialto/src/lib.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,6 @@ pub const TO_RIALTO_ESTIMATE_MESSAGE_FEE_METHOD: &str =
247247
"ToRialtoOutboundLaneApi_estimate_message_delivery_and_dispatch_fee";
248248
/// Name of the `ToRialtoOutboundLaneApi::message_details` runtime method.
249249
pub const TO_RIALTO_MESSAGE_DETAILS_METHOD: &str = "ToRialtoOutboundLaneApi_message_details";
250-
/// Name of the `ToRialtoOutboundLaneApi::latest_received_nonce` runtime method.
251-
pub const TO_RIALTO_LATEST_RECEIVED_NONCE_METHOD: &str =
252-
"ToRialtoOutboundLaneApi_latest_received_nonce";
253250

254251
/// Name of the `FromRialtoInboundLaneApi::latest_received_nonce` runtime method.
255252
pub const FROM_RIALTO_LATEST_RECEIVED_NONCE_METHOD: &str =
@@ -300,8 +297,6 @@ sp_api::decl_runtime_apis! {
300297
begin: MessageNonce,
301298
end: MessageNonce,
302299
) -> Vec<MessageDetails<OutboundMessageFee>>;
303-
/// Returns nonce of the latest message, received by bridged chain.
304-
fn latest_received_nonce(lane: LaneId) -> MessageNonce;
305300
}
306301

307302
/// Inbound message lane API for messages sent by Rialto chain.

bridges/primitives/chain-rococo/src/lib.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,6 @@ pub const TO_ROCOCO_ESTIMATE_MESSAGE_FEE_METHOD: &str =
8787
"ToRococoOutboundLaneApi_estimate_message_delivery_and_dispatch_fee";
8888
/// Name of the `ToRococoOutboundLaneApi::message_details` runtime method.
8989
pub const TO_ROCOCO_MESSAGE_DETAILS_METHOD: &str = "ToRococoOutboundLaneApi_message_details";
90-
/// Name of the `ToRococoOutboundLaneApi::latest_received_nonce` runtime method.
91-
pub const TO_ROCOCO_LATEST_RECEIVED_NONCE_METHOD: &str =
92-
"ToRococoOutboundLaneApi_latest_received_nonce";
9390

9491
/// Name of the `FromRococoInboundLaneApi::latest_received_nonce` runtime method.
9592
pub const FROM_ROCOCO_LATEST_RECEIVED_NONCE_METHOD: &str =
@@ -152,8 +149,6 @@ sp_api::decl_runtime_apis! {
152149
begin: MessageNonce,
153150
end: MessageNonce,
154151
) -> Vec<MessageDetails<OutboundMessageFee>>;
155-
/// Returns nonce of the latest message, received by bridged chain.
156-
fn latest_received_nonce(lane: LaneId) -> MessageNonce;
157152
}
158153

159154
/// Inbound message lane API for messages sent by Rococo chain.

bridges/primitives/chain-wococo/src/lib.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,6 @@ pub const TO_WOCOCO_ESTIMATE_MESSAGE_FEE_METHOD: &str =
5252
"ToWococoOutboundLaneApi_estimate_message_delivery_and_dispatch_fee";
5353
/// Name of the `ToWococoOutboundLaneApi::message_details` runtime method.
5454
pub const TO_WOCOCO_MESSAGE_DETAILS_METHOD: &str = "ToWococoOutboundLaneApi_message_details";
55-
/// Name of the `ToWococoOutboundLaneApi::latest_received_nonce` runtime method.
56-
pub const TO_WOCOCO_LATEST_RECEIVED_NONCE_METHOD: &str =
57-
"ToWococoOutboundLaneApi_latest_received_nonce";
5855

5956
/// Name of the `FromWococoInboundLaneApi::latest_received_nonce` runtime method.
6057
pub const FROM_WOCOCO_LATEST_RECEIVED_NONCE_METHOD: &str =
@@ -105,8 +102,6 @@ sp_api::decl_runtime_apis! {
105102
begin: MessageNonce,
106103
end: MessageNonce,
107104
) -> Vec<MessageDetails<OutboundMessageFee>>;
108-
/// Returns nonce of the latest message, received by bridged chain.
109-
fn latest_received_nonce(lane: LaneId) -> MessageNonce;
110105
}
111106

112107
/// Inbound message lane API for messages sent by Wococo chain.

bridges/relays/client-kusama/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ impl ChainWithMessages for Kusama {
7575
bp_kusama::WITH_KUSAMA_MESSAGES_PALLET_NAME;
7676
const TO_CHAIN_MESSAGE_DETAILS_METHOD: &'static str =
7777
bp_kusama::TO_KUSAMA_MESSAGE_DETAILS_METHOD;
78-
const TO_CHAIN_LATEST_RECEIVED_NONCE_METHOD: &'static str =
79-
bp_kusama::TO_KUSAMA_LATEST_RECEIVED_NONCE_METHOD;
8078
const FROM_CHAIN_LATEST_RECEIVED_NONCE_METHOD: &'static str =
8179
bp_kusama::FROM_KUSAMA_LATEST_RECEIVED_NONCE_METHOD;
8280
const FROM_CHAIN_LATEST_CONFIRMED_NONCE_METHOD: &'static str =

0 commit comments

Comments
 (0)