mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 19:11:04 +00:00
Add broker pallet to coretime-westend (#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: https://github.com/paritytech/devops/issues/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>
This commit is contained in:
@@ -2027,7 +2027,7 @@ pub struct CoretimeProvider;
|
||||
impl CoretimeInterface for CoretimeProvider {
|
||||
type AccountId = AccountId;
|
||||
type Balance = Balance;
|
||||
type RealyChainBlockNumberProvider = System;
|
||||
type RelayChainBlockNumberProvider = System;
|
||||
fn request_core_count(_count: CoreIndex) {}
|
||||
fn request_revenue_info_at(_when: u32) {}
|
||||
fn credit_account(_who: Self::AccountId, _amount: Self::Balance) {}
|
||||
|
||||
@@ -51,7 +51,7 @@ pub enum CoreAssignment {
|
||||
pub type RCBlockNumberOf<T> = <RCBlockNumberProviderOf<T> as BlockNumberProvider>::BlockNumber;
|
||||
|
||||
/// Relay chain block number provider of `T` that implements [`CoretimeInterface`].
|
||||
pub type RCBlockNumberProviderOf<T> = <T as CoretimeInterface>::RealyChainBlockNumberProvider;
|
||||
pub type RCBlockNumberProviderOf<T> = <T as CoretimeInterface>::RelayChainBlockNumberProvider;
|
||||
|
||||
/// Type able to accept Coretime scheduling instructions and provide certain usage information.
|
||||
/// Generally implemented by the Relay-chain or some means of communicating with it.
|
||||
@@ -65,7 +65,7 @@ pub trait CoretimeInterface {
|
||||
type Balance: AtLeast32BitUnsigned;
|
||||
|
||||
/// A provider for the relay chain block number.
|
||||
type RealyChainBlockNumberProvider: BlockNumberProvider;
|
||||
type RelayChainBlockNumberProvider: BlockNumberProvider;
|
||||
|
||||
/// Requests the Relay-chain to alter the number of schedulable cores to `count`. Under normal
|
||||
/// operation, the Relay-chain SHOULD send a `notify_core_count(count)` message back.
|
||||
@@ -128,7 +128,7 @@ pub trait CoretimeInterface {
|
||||
impl CoretimeInterface for () {
|
||||
type AccountId = ();
|
||||
type Balance = u64;
|
||||
type RealyChainBlockNumberProvider = ();
|
||||
type RelayChainBlockNumberProvider = ();
|
||||
|
||||
fn request_core_count(_count: CoreIndex) {}
|
||||
fn request_revenue_info_at(_when: RCBlockNumberOf<Self>) {}
|
||||
|
||||
@@ -77,7 +77,7 @@ pub struct TestCoretimeProvider;
|
||||
impl CoretimeInterface for TestCoretimeProvider {
|
||||
type AccountId = u64;
|
||||
type Balance = u64;
|
||||
type RealyChainBlockNumberProvider = System;
|
||||
type RelayChainBlockNumberProvider = System;
|
||||
fn request_core_count(count: CoreIndex) {
|
||||
CoreCountInbox::<Test>::put(count);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user