Refactor message relay helpers (#1234)

* refactor message relay helpers

* single standalone_metrics function

* fixed tests

* clippy + fmt

* removed commented code

* add calls tracing

* fix spelling

* cargo fmt

* -commented code

* fix build again

* post-merge build fix

* clippy + fmt
This commit is contained in:
Svyatoslav Nikolsky
2021-12-06 16:46:25 +03:00
committed by Bastian Köcher
parent 90f2b3c365
commit 4cdd959057
68 changed files with 1479 additions and 2450 deletions
@@ -16,6 +16,7 @@
//! Types used to connect to the Rialto-Substrate chain.
use frame_support::weights::Weight;
use relay_substrate_client::{Chain, ChainBase};
use std::time::Duration;
@@ -37,10 +38,19 @@ impl ChainBase for RialtoParachain {
type Balance = rialto_parachain_runtime::Balance;
type Index = rialto_parachain_runtime::Index;
type Signature = rialto_parachain_runtime::Signature;
fn max_extrinsic_size() -> u32 {
bp_rialto::Rialto::max_extrinsic_size()
}
fn max_extrinsic_weight() -> Weight {
bp_rialto::Rialto::max_extrinsic_weight()
}
}
impl Chain for RialtoParachain {
const NAME: &'static str = "RialtoParachain";
const TOKEN_ID: Option<&'static str> = None;
// should be fixed/changed in https://github.com/paritytech/parity-bridges-common/pull/1199
const BEST_FINALIZED_HEADER_ID_METHOD: &'static str = "<UNIMPLEMENTED>";
const AVERAGE_BLOCK_INTERVAL: Duration = Duration::from_secs(5);