Skip to content

Commit

Permalink
fix compile issues
Browse files Browse the repository at this point in the history
  • Loading branch information
apopiak committed Oct 20, 2023
1 parent 91ee6ea commit 1d8f646
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 26 deletions.
50 changes: 25 additions & 25 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions integration-tests/parachain-runtime-mock/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ impl cumulus_pallet_xcmp_queue::Config for ParachainRuntime {
type WeightInfo = ();
type ExecuteDeferredOrigin = EnsureRoot<AccountId>;
type MaxDeferredMessages = ConstU32<100>;
type MaxDeferredBuckets = ConstU32<1000>;
type RelayChainBlockNumberProvider = RelayChainBlockNumberProvider<ParachainRuntime>;
type XcmDeferFilter = ();
}
Expand Down
4 changes: 4 additions & 0 deletions integration-tests/src/xcm_rate_limiter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ fn xcm_rate_limiter_should_limit_aca_when_limit_is_exceeded() {
sent_at: 3,
deferred_to: basilisk_runtime::DeferDuration::get() + 4,
message_hash,
index: (basilisk_runtime::DeferDuration::get() + 4, 0),
position: 0,
}
.into(),
pallet_relaychain_info::Event::CurrentBlockNumbers {
Expand Down Expand Up @@ -226,6 +228,8 @@ fn deferred_messages_should_be_executable_by_root() {
sent_at: 3,
deferred_to: basilisk_runtime::DeferDuration::get() + 4,
message_hash,
index: (basilisk_runtime::DeferDuration::get() + 4, 0),
position: 0,
}
.into(),
pallet_relaychain_info::Event::CurrentBlockNumbers {
Expand Down
17 changes: 16 additions & 1 deletion runtime/basilisk/src/weights/xcmp_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,22 @@ impl<T: frame_system::Config> WeightInfo for BasiliskWeight<T> {
}
// Storage: XcmpQueue DeferredXcmMessages (r:1 w:1)
// Proof Skipped: XcmpQueue DeferredXcmMessages (max_values: None, max_size: None, mode: Measured)
fn discard_deferred() -> Weight {
fn discard_deferred_bucket() -> Weight {
// Minimum execution time: 125_025_318 nanoseconds.
Weight::from_ref_time(125_304_870_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: XcmpQueue DeferredXcmMessages (r:1 w:1)
// Proof Skipped: XcmpQueue DeferredXcmMessages (max_values: None, max_size: None, mode: Measured)
fn discard_deferred_individual() -> Weight {
// Minimum execution time: 125_025_318 nanoseconds.
Weight::from_ref_time(125_304_870_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}

fn try_place_in_deferred_queue() -> Weight {
// Minimum execution time: 125_025_318 nanoseconds.
Weight::from_ref_time(125_304_870_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
Expand Down
1 change: 1 addition & 0 deletions runtime/basilisk/src/xcm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime {
type WeightInfo = weights::xcmp_queue::BasiliskWeight<Runtime>;
type ExecuteDeferredOrigin = EnsureRoot<AccountId>;
type MaxDeferredMessages = ConstU32<100>;
type MaxDeferredBuckets = ConstU32<1000>;
type RelayChainBlockNumberProvider = RelayChainBlockNumberProvider<Runtime>;
type XcmDeferFilter = XcmRateLimiter;
}
Expand Down

0 comments on commit 1d8f646

Please sign in to comment.