Skip to content

Commit 65d3d08

Browse files
seadandabkchrantonva
authored
Add broker pallet to coretime-westend (paritytech#3272)
This brings functionality to Westend's Coretime Chain runtime, where previously it was not much more than a shell. It is assumed that the Coretime pallet will have the same index in the Westend runtime as it does in Rococo for the runtime calls. TODO: - [x] Generate chainspec - [x] Regenerate weights - [x] Check hardcoded RuntimeCall weights against relay weights for transacts Aura key generation: paritytech/devops#2725 --------- Co-authored-by: command-bot <> Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: Anton Vilhelm Ásgeirsson <antonva@users.noreply.github.com>
1 parent 64ea4c5 commit 65d3d08

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

substrate/bin/node/runtime/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2027,7 +2027,7 @@ pub struct CoretimeProvider;
20272027
impl CoretimeInterface for CoretimeProvider {
20282028
type AccountId = AccountId;
20292029
type Balance = Balance;
2030-
type RealyChainBlockNumberProvider = System;
2030+
type RelayChainBlockNumberProvider = System;
20312031
fn request_core_count(_count: CoreIndex) {}
20322032
fn request_revenue_info_at(_when: u32) {}
20332033
fn credit_account(_who: Self::AccountId, _amount: Self::Balance) {}

substrate/frame/broker/src/coretime_interface.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ pub enum CoreAssignment {
5151
pub type RCBlockNumberOf<T> = <RCBlockNumberProviderOf<T> as BlockNumberProvider>::BlockNumber;
5252

5353
/// Relay chain block number provider of `T` that implements [`CoretimeInterface`].
54-
pub type RCBlockNumberProviderOf<T> = <T as CoretimeInterface>::RealyChainBlockNumberProvider;
54+
pub type RCBlockNumberProviderOf<T> = <T as CoretimeInterface>::RelayChainBlockNumberProvider;
5555

5656
/// Type able to accept Coretime scheduling instructions and provide certain usage information.
5757
/// Generally implemented by the Relay-chain or some means of communicating with it.
@@ -65,7 +65,7 @@ pub trait CoretimeInterface {
6565
type Balance: AtLeast32BitUnsigned;
6666

6767
/// A provider for the relay chain block number.
68-
type RealyChainBlockNumberProvider: BlockNumberProvider;
68+
type RelayChainBlockNumberProvider: BlockNumberProvider;
6969

7070
/// Requests the Relay-chain to alter the number of schedulable cores to `count`. Under normal
7171
/// operation, the Relay-chain SHOULD send a `notify_core_count(count)` message back.
@@ -128,7 +128,7 @@ pub trait CoretimeInterface {
128128
impl CoretimeInterface for () {
129129
type AccountId = ();
130130
type Balance = u64;
131-
type RealyChainBlockNumberProvider = ();
131+
type RelayChainBlockNumberProvider = ();
132132

133133
fn request_core_count(_count: CoreIndex) {}
134134
fn request_revenue_info_at(_when: RCBlockNumberOf<Self>) {}

substrate/frame/broker/src/mock.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ pub struct TestCoretimeProvider;
7777
impl CoretimeInterface for TestCoretimeProvider {
7878
type AccountId = u64;
7979
type Balance = u64;
80-
type RealyChainBlockNumberProvider = System;
80+
type RelayChainBlockNumberProvider = System;
8181
fn request_core_count(count: CoreIndex) {
8282
CoreCountInbox::<Test>::put(count);
8383
}

0 commit comments

Comments
 (0)