replace latest_confirmed_nonce runtime APIs with direct storage reads (#1282)

This commit is contained in:
Svyatoslav Nikolsky
2022-01-13 15:08:21 +03:00
committed by Bastian Köcher
parent fd816b60e3
commit 1d99ad3619
21 changed files with 57 additions and 163 deletions
@@ -250,9 +250,6 @@ pub const TO_RIALTO_ESTIMATE_MESSAGE_FEE_METHOD: &str =
/// Name of the `ToRialtoOutboundLaneApi::message_details` runtime method.
pub const TO_RIALTO_MESSAGE_DETAILS_METHOD: &str = "ToRialtoOutboundLaneApi_message_details";
/// Name of the `FromRialtoInboundLaneApi::latest_onfirmed_nonce` runtime method.
pub const FROM_RIALTO_LATEST_CONFIRMED_NONCE_METHOD: &str =
"FromRialtoInboundLaneApi_latest_confirmed_nonce";
/// Name of the `FromRialtoInboundLaneApi::unrewarded_relayers_state` runtime method.
pub const FROM_RIALTO_UNREWARDED_RELAYERS_STATE: &str =
"FromRialtoInboundLaneApi_unrewarded_relayers_state";
@@ -302,8 +299,6 @@ sp_api::decl_runtime_apis! {
/// This API is implemented by runtimes that are receiving messages from Rialto chain, not the
/// Rialto runtime itself.
pub trait FromRialtoInboundLaneApi {
/// Nonce of the latest message that has been confirmed to the bridged chain.
fn latest_confirmed_nonce(lane: LaneId) -> MessageNonce;
/// State of the unrewarded relayers set at given lane.
fn unrewarded_relayers_state(lane: LaneId) -> UnrewardedRelayersState;
}