Commit d7160ad9 authored by Bastian Köcher's avatar Bastian Köcher Committed by DemiMarie-parity
Browse files

Update to latest substrate master (#197)

parent b471f0f1
Pipeline #34529 passed with stages
in 22 minutes and 35 seconds
This diff is collapsed.
......@@ -275,7 +275,7 @@ pub fn branches<'a>(chunks: Vec<&'a [u8]>) -> Branches<'a> {
pub fn branch_hash(root: &H256, branch_nodes: &[Vec<u8>], index: usize) -> Result<H256, Error> {
let mut trie_storage: MemoryDB<Blake2Hasher> = MemoryDB::default();
for node in branch_nodes.iter() {
(&mut trie_storage as &mut trie::HashDB<_>).insert(node.as_slice());
(&mut trie_storage as &mut trie::HashDB<_>).insert(&[], node.as_slice());
}
let trie = TrieDB::new(&trie_storage, &root).map_err(|_| Error::InvalidBranchProof)?;
......
......@@ -31,7 +31,7 @@ use parking_lot::RwLock;
use super::NetworkService;
/// The engine ID of the polkadot attestation system.
pub const POLKADOT_ENGINE_ID: substrate_network::ConsensusEngineId = [b'd', b'o', b't', b'1'];
pub const POLKADOT_ENGINE_ID: sr_primitives::ConsensusEngineId = [b'd', b'o', b't', b'1'];
/// A gossip message.
#[derive(Encode, Decode, Clone)]
......
......@@ -208,7 +208,7 @@ impl Core<Block> for RuntimeApi {
unimplemented!("Not required for testing!")
}
fn initialise_block_runtime_api_impl(
fn initialize_block_runtime_api_impl(
&self,
_: &BlockId,
_: ExecutionContext,
......
......@@ -45,7 +45,7 @@ libsecp256k1 = "0.2.1"
tiny-keccak = "1.4.2"
substrate-keyring = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
substrate-trie = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
trie-db = "0.11"
trie-db = "0.12"
[features]
default = ["std"]
......
......@@ -41,7 +41,7 @@ decl_module! {
grandpa::Module::<T>::schedule_change(voters, T::BlockNumber::zero(), None)?;
}
fn on_finalise(block_number: T::BlockNumber) {
fn on_finalize(block_number: T::BlockNumber) {
// every so often shuffle the voters and issue a change.
let shuffle_period: u64 = Self::shuffle_period().as_();
if shuffle_period == 0 { return }
......@@ -75,10 +75,10 @@ decl_module! {
voters.swap(remaining - 1, voter_index);
}
// finalisation order is undefined, so grandpa's on_finalise might
// finalization order is undefined, so grandpa's on_finalize might
// have already been called. calling it again is OK though.
let _ = grandpa::Module::<T>::schedule_change(voters, T::BlockNumber::zero(), None);
grandpa::Module::<T>::on_finalise(block_number);
grandpa::Module::<T>::on_finalize(block_number);
}
}
}
......
......@@ -298,8 +298,8 @@ impl_runtime_apis! {
Executive::execute_block(block)
}
fn initialise_block(header: &<Block as BlockT>::Header) {
Executive::initialise_block(header)
fn initialize_block(header: &<Block as BlockT>::Header) {
Executive::initialize_block(header)
}
}
......@@ -314,8 +314,8 @@ impl_runtime_apis! {
Executive::apply_extrinsic(extrinsic)
}
fn finalise_block() -> <Block as BlockT>::Header {
Executive::finalise_block()
fn finalize_block() -> <Block as BlockT>::Header {
Executive::finalize_block()
}
fn inherent_extrinsics(data: InherentData) -> Vec<<Block as BlockT>::Extrinsic> {
......
This diff is collapsed.
......@@ -141,7 +141,7 @@ fn staging_testnet_config_genesis() -> GenesisConfig {
enact_delay_period: 0,
}),
timestamp: Some(TimestampConfig {
period: SECS_PER_BLOCK / 2, // due to the nature of aura the slots are 2*period
minimum_period: SECS_PER_BLOCK / 2, // due to the nature of aura the slots are 2*period
}),
treasury: Some(TreasuryConfig {
proposal_bond: Permill::from_percent(5),
......@@ -283,7 +283,7 @@ pub fn testnet_genesis(
}),
parachains: Some(Default::default()),
timestamp: Some(TimestampConfig {
period: 2, // 2*2=4 second block time.
minimum_period: 2, // 2*2=4 second block time.
}),
treasury: Some(TreasuryConfig {
proposal_bond: Permill::from_percent(5),
......
......@@ -304,6 +304,7 @@ construct_service_factory! {
client,
NothingExtra,
config.custom.inherent_data_providers.clone(),
true,
).map_err(Into::into)
}},
LightImportQueue = AuraImportQueue<
......@@ -319,6 +320,7 @@ construct_service_factory! {
client,
NothingExtra,
config.custom.inherent_data_providers.clone(),
true,
).map_err(Into::into)
}},
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment