Bump Substrate (#871)

* Bump Substrate

* Change usage of "Module" to "Pallet"

Related Substrate PR: https://github.com/paritytech/substrate/pull/8372

* Add `OnSetCode` config param

Related Substrate PR: https://github.com/paritytech/substrate/pull/8496

* Update Aura Slot duration time type

Related Substrate PR: https://github.com/paritytech/substrate/pull/8386

* Add `OnSetCode` to mock runtimes

* Add support for multiple justifications

Related Substrate PR: https://github.com/paritytech/substrate/pull/7640

* Use updated justification type in more places

* Make GenesisConfig type non-optional

Related Substrate PR: https://github.com/paritytech/substrate/pull/8275

* Update service to use updated telemetry

Related Substrate PR: https://github.com/paritytech/substrate/pull/8143

* Appease Clippy
This commit is contained in:
Hernando Castano
2021-04-07 11:56:45 -04:00
committed by Bastian Köcher
parent d9c553374c
commit c6ae74725b
32 changed files with 501 additions and 395 deletions
+6 -4
View File
@@ -24,7 +24,7 @@ use sp_runtime::{
traits::{
AtLeast32Bit, Block as BlockT, Dispatchable, MaybeDisplay, MaybeSerialize, MaybeSerializeDeserialize, Member,
},
Justification,
EncodedJustification,
};
use std::{fmt::Debug, time::Duration};
@@ -71,7 +71,7 @@ pub trait BlockWithJustification<Header> {
/// Return block header.
fn header(&self) -> Header;
/// Return block justification, if known.
fn justification(&self) -> Option<&Justification>;
fn justification(&self) -> Option<&EncodedJustification>;
}
/// Substrate-based chain transactions signing scheme.
@@ -97,7 +97,9 @@ impl<Block: BlockT> BlockWithJustification<Block::Header> for SignedBlock<Block>
self.block.header().clone()
}
fn justification(&self) -> Option<&Justification> {
self.justification.as_ref()
fn justification(&self) -> Option<&EncodedJustification> {
self.justifications
.as_ref()
.and_then(|j| j.get(sp_finality_grandpa::GRANDPA_ENGINE_ID))
}
}