mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 09:51:02 +00:00
Remove kusama and polkadot runtime crates (#1731)
This pull request is removing the Kusama and Polkadot runtime crates. As still some crates dependent on the runtime crates, this pull request is doing some more changes. - It removes the `hostperfcheck` CLI command. This CLI command could compare the current node against the standard hardware by doing some checks. Later we added the hardware benchmark feature to Substrate. This hardware benchmark is running on every node startup and prints a warning if the current node is too slow. This makes this CLI command a duplicate that was also depending on the kusama runtime. - The pull request is removing the emulated integration tests that were requiring the Kusama or Polkadot runtime crates.
This commit is contained in:
@@ -27,20 +27,20 @@ pub mod consensus {
|
||||
|
||||
/// Constants relating to KSM.
|
||||
pub mod currency {
|
||||
use kusama_runtime_constants as constants;
|
||||
use polkadot_core_primitives::Balance;
|
||||
|
||||
/// The existential deposit. Set to 1/10 of its parent Relay Chain.
|
||||
pub const EXISTENTIAL_DEPOSIT: Balance = constants::currency::EXISTENTIAL_DEPOSIT / 10;
|
||||
pub const EXISTENTIAL_DEPOSIT: Balance = 1 * CENTS / 10;
|
||||
|
||||
pub const UNITS: Balance = constants::currency::UNITS;
|
||||
pub const CENTS: Balance = constants::currency::CENTS;
|
||||
pub const GRAND: Balance = constants::currency::GRAND;
|
||||
pub const MILLICENTS: Balance = constants::currency::MILLICENTS;
|
||||
pub const UNITS: Balance = 1_000_000_000_000;
|
||||
pub const QUID: Balance = UNITS / 30;
|
||||
pub const CENTS: Balance = QUID / 100;
|
||||
pub const GRAND: Balance = QUID * 1_000;
|
||||
pub const MILLICENTS: Balance = CENTS / 1_000;
|
||||
|
||||
pub const fn deposit(items: u32, bytes: u32) -> Balance {
|
||||
// map to 1/100 of what the kusama relay chain charges (v9020)
|
||||
constants::currency::deposit(items, bytes) / 100
|
||||
(items as Balance * 2_000 * CENTS + (bytes as Balance) * 100 * MILLICENTS) / 100
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -48,19 +48,19 @@ pub mod consensus {
|
||||
/// Constants relating to DOT.
|
||||
pub mod currency {
|
||||
use polkadot_core_primitives::Balance;
|
||||
use polkadot_runtime_constants as constants;
|
||||
|
||||
/// The existential deposit. Set to 1/10 of its parent Relay Chain.
|
||||
pub const EXISTENTIAL_DEPOSIT: Balance = constants::currency::EXISTENTIAL_DEPOSIT / 10;
|
||||
pub const EXISTENTIAL_DEPOSIT: Balance = 100 * CENTS / 10;
|
||||
|
||||
pub const UNITS: Balance = constants::currency::UNITS;
|
||||
pub const DOLLARS: Balance = constants::currency::DOLLARS;
|
||||
pub const CENTS: Balance = constants::currency::CENTS;
|
||||
pub const MILLICENTS: Balance = constants::currency::MILLICENTS;
|
||||
pub const UNITS: Balance = 10_000_000_000;
|
||||
pub const DOLLARS: Balance = UNITS; // 10_000_000_000
|
||||
pub const GRAND: Balance = DOLLARS * 1_000; // 10_000_000_000_000
|
||||
pub const CENTS: Balance = DOLLARS / 100; // 100_000_000
|
||||
pub const MILLICENTS: Balance = CENTS / 1_000; // 100_000
|
||||
|
||||
pub const fn deposit(items: u32, bytes: u32) -> Balance {
|
||||
// 1/100 of Polkadot
|
||||
constants::currency::deposit(items, bytes) / 100
|
||||
(items as Balance * 20 * DOLLARS + (bytes as Balance) * 100 * MILLICENTS) / 100
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user