Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Commit

Permalink
Fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
dastanbeksamatov committed Aug 24, 2023
1 parent 153e75e commit e5f83b5
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 37 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.

2 changes: 1 addition & 1 deletion primitives/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "bp-evochain"
name = "ep-core"
description = "Primitives of Evochain runtime."
version = "0.1.0"
authors = ["Parity Technologies <[email protected]>"]
Expand Down
7 changes: 6 additions & 1 deletion runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ frame-system-rpc-runtime-api = { default-features = false, git = "https://github
pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0" }

# Primitive types
bp-evochain = { path = "../primitives", default-features = false }
ep-core = { path = "../primitives", default-features = false }

# Used for runtime benchmarking
frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", optional = true , branch = "polkadot-v1.0.0" }
Expand All @@ -61,6 +61,7 @@ substrate-wasm-builder = { git = "https://github.com/paritytech/substrate.git",
[features]
default = ["std"]
std = [
"ep-core/std",
"frame-try-runtime?/std",
"frame-system-benchmarking?/std",
"frame-benchmarking?/std",
Expand Down Expand Up @@ -102,8 +103,10 @@ runtime-benchmarks = [
"frame-system/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-grandpa/runtime-benchmarks",
"pallet-sudo/runtime-benchmarks",
"pallet-template/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks",
"pallet-utility/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]
try-runtime = [
Expand All @@ -118,4 +121,6 @@ try-runtime = [
"pallet-template/try-runtime",
"pallet-timestamp/try-runtime",
"pallet-transaction-payment/try-runtime",
"pallet-utility/try-runtime",
"sp-runtime/try-runtime",
]
20 changes: 10 additions & 10 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,26 +48,26 @@ pub use sp_runtime::{Perbill, Permill};
pub use pallet_template;

/// An index to a block.
pub type BlockNumber = bp_evochain::BlockNumber;
pub type BlockNumber = ep_core::BlockNumber;

/// The type for storing how many extrinsics an account has signed.
pub type Nonce = bp_evochain::Nonce;
pub type Nonce = ep_core::Nonce;

/// Alias to 512-bit hash when used in the context of a transaction signature on the chain.
pub type Signature = bp_evochain::Signature;
pub type Signature = ep_core::Signature;

/// Some way of identifying an account on the chain. We intentionally make it equivalent
/// to the public key of our transaction signing scheme.
pub type AccountId = bp_evochain::AccountId;
pub type AccountId = ep_core::AccountId;

/// Balance of an account.
pub type Balance = bp_evochain::Balance;
pub type Balance = ep_core::Balance;

/// A hash of some data used by the chain.
pub type Hash = bp_evochain::Hash;
pub type Hash = ep_core::Hash;

/// Hashing type
pub type Hashing = bp_evochain::Hasher;
pub type Hashing = ep_core::Hasher;

/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know
/// the specifics of the runtime. They can then be made to be agnostic over specific formats
Expand Down Expand Up @@ -230,7 +230,7 @@ impl pallet_timestamp::Config for Runtime {
}

parameter_types! {
pub const ExistentialDeposit: bp_evochain::Balance = 500;
pub const ExistentialDeposit: ep_core::Balance = 500;
}

impl pallet_balances::Config for Runtime {
Expand Down Expand Up @@ -300,9 +300,9 @@ construct_runtime!(
);

/// The address format for describing accounts.
pub type Address = bp_evochain::AccountId;
pub type Address = ep_core::AccountId;
/// Block header type as expected by this runtime.
pub type Header = bp_evochain::Header;
pub type Header = ep_core::Header;
/// Block type as expected by this runtime.
pub type Block = generic::Block<Header, UncheckedExtrinsic>;
/// The SignedExtension to the basic transaction logic.
Expand Down

0 comments on commit e5f83b5

Please sign in to comment.