Remove deprecated API (#4993)

* Remove deprecated API

* Remove (some) allow(dead_code)

* Bump spec_version

* Fix import, remove allow dead code.

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
Stanislav Tkach
2020-02-20 18:03:33 +02:00
committed by GitHub
parent b368736be4
commit 504914b0a6
9 changed files with 25 additions and 142 deletions
-1
View File
@@ -248,7 +248,6 @@ impl<T: Trait> pallet_session::ShouldEndSession<T::BlockNumber> for Module<T> {
/// A BABE equivocation offence report.
///
/// When a validator released two or more blocks at the same slot.
#[allow(dead_code)]
struct BabeEquivocationOffence<FullIdentification> {
/// A babe slot number in which this incident happened.
slot: u64,
+2 -4
View File
@@ -15,17 +15,15 @@
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
//! Test utilities
#![allow(dead_code, unused_imports)]
use super::{Trait, Module, GenesisConfig};
use sp_consensus_babe::AuthorityId;
use sp_runtime::{
traits::IdentityLookup, Perbill, PerThing, testing::{Header, UintAuthorityId}, impl_opaque_keys,
traits::IdentityLookup, Perbill, testing::{Header, UintAuthorityId}, impl_opaque_keys,
};
use sp_version::RuntimeVersion;
use frame_support::{impl_outer_origin, parameter_types, weights::Weight};
use sp_io;
use sp_core::{H256, Blake2Hasher};
use sp_core::H256;
impl_outer_origin!{
pub enum Origin for Test where system = frame_system {}
+1 -3
View File
@@ -17,7 +17,7 @@
//! Consensus extension module tests for BABE consensus.
use super::*;
use mock::{new_test_ext, Babe, Test};
use mock::{new_test_ext, Babe, System};
use sp_runtime::{traits::OnFinalize, testing::{Digest, DigestItem}};
use pallet_session::ShouldEndSession;
@@ -66,8 +66,6 @@ fn check_module() {
})
}
type System = frame_system::Module<Test>;
#[test]
fn first_block_epoch_zero_start() {
new_test_ext(vec![0, 1, 2, 3]).execute_with(|| {