Skip to content

Commit a5f421e

Browse files
authored
extend abridged host config (#7659)
added asynchronous backing params
1 parent ee54bcf commit a5f421e

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

polkadot/primitives/src/v5/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,6 +1165,8 @@ pub struct AbridgedHostConfiguration {
11651165
pub validation_upgrade_cooldown: BlockNumber,
11661166
/// The delay, in blocks, before a validation upgrade is applied.
11671167
pub validation_upgrade_delay: BlockNumber,
1168+
/// Asynchronous backing parameters.
1169+
pub async_backing_params: super::vstaging::AsyncBackingParams,
11681170
}
11691171

11701172
/// Abridged version of `HrmpChannel` (from the `Hrmp` parachains host runtime module) meant to be

polkadot/runtime/parachains/src/configuration.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,13 @@ pub struct HostConfiguration<BlockNumber> {
124124
///
125125
/// [#4601]: https://github.com/paritytech/polkadot/issues/4601
126126
pub validation_upgrade_delay: BlockNumber,
127+
/// Asynchronous backing parameters.
128+
pub async_backing_params: AsyncBackingParams,
127129

128130
/**
129131
* The parameters that are not essential, but still may be of interest for parachains.
130132
*/
131133

132-
/// Asynchronous backing parameters.
133-
pub async_backing_params: AsyncBackingParams,
134134
/// The maximum POV block size, in bytes.
135135
pub max_pov_size: u32,
136136
/// The maximum size of a message that can be put in a downward message queue.

polkadot/runtime/parachains/src/configuration/tests.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,9 @@ fn verify_externally_accessible() {
487487
use primitives::{well_known_keys, AbridgedHostConfiguration};
488488

489489
new_test_ext(Default::default()).execute_with(|| {
490-
let ground_truth = HostConfiguration::default();
490+
let mut ground_truth = HostConfiguration::default();
491+
ground_truth.async_backing_params =
492+
AsyncBackingParams { allowed_ancestry_len: 111, max_candidate_depth: 222 };
491493

492494
// Make sure that the configuration is stored in the storage.
493495
ActiveConfig::<Test>::put(ground_truth.clone());
@@ -511,6 +513,7 @@ fn verify_externally_accessible() {
511513
hrmp_max_message_num_per_candidate: ground_truth.hrmp_max_message_num_per_candidate,
512514
validation_upgrade_cooldown: ground_truth.validation_upgrade_cooldown,
513515
validation_upgrade_delay: ground_truth.validation_upgrade_delay,
516+
async_backing_params: ground_truth.async_backing_params,
514517
},
515518
);
516519
});

0 commit comments

Comments
 (0)