File tree Expand file tree Collapse file tree 4 files changed +12
-3
lines changed
primitives/chain-bridge-hub-cumulus
client-bridge-hub-rococo/src
client-bridge-hub-wococo/src Expand file tree Collapse file tree 4 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ bp-messages = { path = "../../primitives/messages", default-features = false }
1717frame-system = { git = " https://github.com/paritytech/substrate" , branch = " master" , default-features = false }
1818frame-support = { git = " https://github.com/paritytech/substrate" , branch = " master" , default-features = false }
1919sp-api = { git = " https://github.com/paritytech/substrate" , branch = " master" , default-features = false }
20+ sp-std = { git = " https://github.com/paritytech/substrate" , branch = " master" , default-features = false }
2021
2122# Polkadot Dependencies
2223polkadot-primitives = { git = " https://github.com/paritytech/polkadot" , branch = " master" , default-features = false }
@@ -29,5 +30,6 @@ std = [
2930 " frame-system/std" ,
3031 " frame-support/std" ,
3132 " sp-api/std" ,
33+ " sp-std/std" ,
3234 " polkadot-primitives/std" ,
3335]
Original file line number Diff line number Diff line change @@ -29,6 +29,12 @@ use frame_support::{
2929 weights:: constants,
3030} ;
3131use frame_system:: limits;
32+ use sp_std:: time:: Duration ;
33+
34+ /// Average block interval in Cumulus-based parachains.
35+ ///
36+ /// Corresponds to the `MILLISECS_PER_BLOCK` from `parachains_common` crate.
37+ pub const AVERAGE_BLOCK_INTERVAL : Duration = Duration :: from_secs ( 12 ) ;
3238
3339/// All cumulus bridge hubs allow normal extrinsics to fill block up to 75 percent.
3440///
Original file line number Diff line number Diff line change 1616
1717//! Types used to connect to the BridgeHub-Rococo-Substrate parachain.
1818
19+ use bp_bridge_hub_rococo:: AVERAGE_BLOCK_INTERVAL ;
1920use bp_bridge_hub_wococo:: PolkadotSignedExtension ;
2021use bp_messages:: MessageNonce ;
2122use codec:: Encode ;
@@ -44,7 +45,7 @@ impl Chain for BridgeHubRococo {
4445 const TOKEN_ID : Option < & ' static str > = None ;
4546 const BEST_FINALIZED_HEADER_ID_METHOD : & ' static str =
4647 bp_bridge_hub_rococo:: BEST_FINALIZED_BRIDGE_HUB_ROCOCO_HEADER_METHOD ;
47- const AVERAGE_BLOCK_INTERVAL : Duration = Duration :: from_secs ( 6 ) ;
48+ const AVERAGE_BLOCK_INTERVAL : Duration = AVERAGE_BLOCK_INTERVAL ;
4849
4950 type SignedBlock = bp_bridge_hub_rococo:: SignedBlock ;
5051 type Call = runtime:: Call ;
Original file line number Diff line number Diff line change 1616
1717//! Types used to connect to the BridgeHub-Wococo-Substrate parachain.
1818
19- use bp_bridge_hub_wococo:: PolkadotSignedExtension ;
19+ use bp_bridge_hub_wococo:: { PolkadotSignedExtension , AVERAGE_BLOCK_INTERVAL } ;
2020use bp_messages:: MessageNonce ;
2121use codec:: Encode ;
2222use relay_substrate_client:: {
@@ -44,7 +44,7 @@ impl Chain for BridgeHubWococo {
4444 const TOKEN_ID : Option < & ' static str > = None ;
4545 const BEST_FINALIZED_HEADER_ID_METHOD : & ' static str =
4646 bp_bridge_hub_wococo:: BEST_FINALIZED_BRIDGE_HUB_WOCOCO_HEADER_METHOD ;
47- const AVERAGE_BLOCK_INTERVAL : Duration = Duration :: from_secs ( 6 ) ;
47+ const AVERAGE_BLOCK_INTERVAL : Duration = AVERAGE_BLOCK_INTERVAL ;
4848
4949 type SignedBlock = bp_bridge_hub_wococo:: SignedBlock ;
5050 type Call = runtime:: Call ;
You can’t perform that action at this time.
0 commit comments