Update Polkadot/Substrate (#68)

* Update Polkadot/Substrate

* Update branch
This commit is contained in:
Bastian Köcher
2020-02-24 21:52:49 +01:00
committed by GitHub
parent 28ad9997ea
commit 41817628b7
8 changed files with 727 additions and 571 deletions
+19 -17
View File
@@ -169,18 +169,20 @@ impl frame_system::Trait for Runtime {
type Version = Version;
/// Converts a module to an index of this module in the runtime.
type ModuleToIndex = ModuleToIndex;
type AccountData = pallet_balances::AccountData<Balance>;
type OnNewAccount = ();
type OnReapAccount = Balances;
}
parameter_types! {
pub const IndexDeposit: Balance = 1;
}
impl pallet_indices::Trait for Runtime {
/// The type for recording indexing into the account enumeration. If this ever overflows, there
/// will be problems!
type AccountIndex = u32;
/// Use the standard means of resolving an index hint from an id.
type ResolveHint = pallet_indices::SimpleResolveHint<Self::AccountId, Self::AccountIndex>;
/// Determine whether an account is dead.
type IsDeadAccount = Balances;
/// The ubiquitous event type.
type Event = Event;
type Currency = Balances;
type Deposit = IndexDeposit;
}
parameter_types! {
@@ -205,15 +207,11 @@ parameter_types! {
impl pallet_balances::Trait for Runtime {
/// The type for recording an account's balance.
type Balance = Balance;
/// What to do if a new account is created.
type OnNewAccount = Indices;
/// The ubiquitous event type.
type Event = Event;
type DustRemoval = ();
type TransferPayment = ();
type ExistentialDeposit = ExistentialDeposit;
type CreationFee = CreationFee;
type OnReapAccount = System;
type AccountStore = System;
}
impl pallet_transaction_payment::Trait for Runtime {
@@ -226,8 +224,8 @@ impl pallet_transaction_payment::Trait for Runtime {
}
impl pallet_sudo::Trait for Runtime {
type Call = Call;
type Event = Event;
type Proposal = Call;
}
construct_runtime! {
@@ -236,11 +234,11 @@ construct_runtime! {
NodeBlock = opaque::Block,
UncheckedExtrinsic = UncheckedExtrinsic
{
System: frame_system::{Module, Call, Storage, Config, Event},
System: frame_system::{Module, Call, Storage, Config, Event<T>},
Timestamp: pallet_timestamp::{Module, Call, Storage, Inherent},
Indices: pallet_indices,
Balances: pallet_balances,
Sudo: pallet_sudo,
Indices: pallet_indices::{Module, Call, Storage, Config<T>, Event<T>},
Balances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>},
Sudo: pallet_sudo::{Module, Call, Storage, Config<T>, Event<T>},
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage},
}
}
@@ -305,6 +303,10 @@ impl_runtime_apis! {
Executive::apply_extrinsic(extrinsic)
}
fn apply_trusted_extrinsic(extrinsic: <Block as BlockT>::Extrinsic) -> ApplyExtrinsicResult {
Executive::apply_trusted_extrinsic(extrinsic)
}
fn finalize_block() -> <Block as BlockT>::Header {
Executive::finalize_block()
}
+1 -1
View File
@@ -87,7 +87,7 @@ fn testnet_genesis(
changes_trie_config: Default::default(),
}),
pallet_indices: Some(IndicesConfig {
ids: endowed_accounts.clone(),
indices: vec![],
}),
pallet_balances: Some(BalancesConfig {
balances: endowed_accounts
+1
View File
@@ -122,6 +122,7 @@ pub fn run(version: VersionInfo) -> error::Result<()> {
enable_mdns: false,
allow_private_ipv4,
wasm_external_transport: None,
use_yamux_flow_control: false,
};
match config.roles {