Skip to content
This repository has been archived by the owner on Feb 3, 2024. It is now read-only.

Commit

Permalink
Remove S2S RPCs (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
fewensa authored Jul 12, 2022
1 parent 5bff436 commit 2a0dd8c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 64 deletions.
43 changes: 0 additions & 43 deletions runtime/crab-parachain/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,49 +285,6 @@ sp_api::impl_runtime_apis! {
}
}

impl bp_crab::CrabFinalityApi<Block> for Runtime {
fn best_finalized() -> (bp_crab::BlockNumber, bp_crab::Hash) {
let header = BridgeCrabGrandpa::best_finalized();
(header.number, header.hash())
}
}

impl bp_crab::ToCrabOutboundLaneApi<Block, Balance, bm_crab::ToCrabMessagePayload> for Runtime {
fn message_details(
lane: bp_messages::LaneId,
begin: bp_messages::MessageNonce,
end: bp_messages::MessageNonce,
) -> Vec<bp_messages::MessageDetails<Balance>> {
bridge_runtime_common::messages_api::outbound_message_details::<
Runtime,
WithCrabMessages,
bm_crab::WithCrabMessageBridge,
>(lane, begin, end)
}

fn latest_received_nonce(lane: bp_messages::LaneId) -> bp_messages::MessageNonce {
BridgeCrabMessages::outbound_latest_received_nonce(lane)
}

fn latest_generated_nonce(lane: bp_messages::LaneId) -> bp_messages::MessageNonce {
BridgeCrabMessages::outbound_latest_generated_nonce(lane)
}
}

impl bp_crab::FromCrabInboundLaneApi<Block> for Runtime {
fn latest_received_nonce(lane: bp_messages::LaneId) -> bp_messages::MessageNonce {
BridgeCrabMessages::inbound_latest_received_nonce(lane)
}

fn latest_confirmed_nonce(lane: bp_messages::LaneId) -> bp_messages::MessageNonce {
BridgeCrabMessages::inbound_latest_confirmed_nonce(lane)
}

fn unrewarded_relayers_state(lane: bp_messages::LaneId) -> bp_messages::UnrewardedRelayersState {
BridgeCrabMessages::inbound_unrewarded_relayers_state(lane)
}
}

#[cfg(feature = "runtime-benchmarks")]
impl frame_benchmarking::Benchmark<Block> for Runtime {
fn benchmark_metadata(extra: bool) -> (
Expand Down
21 changes: 0 additions & 21 deletions runtime/pangolin-parachain/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,27 +298,6 @@ sp_api::impl_runtime_apis! {
}
}

impl bp_pangolin::PangolinFinalityApi<Block> for Runtime {
fn best_finalized() -> (bp_pangolin::BlockNumber, bp_pangolin::Hash) {
let header = BridgePangolinGrandpa::best_finalized();
(header.number, header.hash())
}
}

impl bp_pangolin::ToPangolinOutboundLaneApi<Block, Balance, bm_pangolin::ToPangolinMessagePayload> for Runtime {
fn message_details(
lane: bp_messages::LaneId,
begin: bp_messages::MessageNonce,
end: bp_messages::MessageNonce,
) -> Vec<bp_messages::MessageDetails<Balance>> {
bridge_runtime_common::messages_api::outbound_message_details::<
Runtime,
WithPangolinMessages,
bm_pangolin::WithPangolinMessageBridge,
>(lane, begin, end)
}
}

#[cfg(feature = "runtime-benchmarks")]
impl frame_benchmarking::Benchmark<Block> for Runtime {
fn benchmark_metadata(extra: bool) -> (
Expand Down

0 comments on commit 2a0dd8c

Please sign in to comment.