Silence known deprecation warnings (#2651)

* Silence known deprecation warnings

1. Prefixes known instances of usages of client.backend and client.import_lock with `#[allow(deprecated)]` to silence the warnings. 2. Remove file-global `#![allow(deprecated)]` used in these cases. Both to prevent us overlooking externally caused deprecation messages.

* fixing missing ;

* fix missing test cases

* move deprecated markers to make CI happy

* move deprecated markers to make CI happy

* attempt to fix the test

* bumping impl_version of node runtime

* Minor cleanup
This commit is contained in:
Benjamin Kampmann
2019-05-28 10:35:00 +02:00
committed by Tomasz Drwięga
parent b10ecd7931
commit 22d3043917
20 changed files with 95 additions and 38 deletions
@@ -119,6 +119,7 @@ impl TestNetFactory for GrandpaTestNet {
{
match client {
PeersClient::Full(ref client) => {
#[allow(deprecated)]
let select_chain = LongestChain::new(
client.backend().clone(),
client.import_lock().clone()
@@ -676,6 +677,7 @@ fn transition_3_voters_twice_1_full_observer() {
"Peer #{} failed to sync", i);
let set: AuthoritySet<Hash, BlockNumber> = crate::aux_schema::load_authorities(
#[allow(deprecated)]
&**full_client.backend()
).unwrap();
@@ -765,6 +767,7 @@ fn transition_3_voters_twice_1_full_observer() {
.map(move |()| {
let full_client = client.as_full().expect("only full clients are used in test");
let set: AuthoritySet<Hash, BlockNumber> = crate::aux_schema::load_authorities(
#[allow(deprecated)]
&**full_client.backend()
).unwrap();
@@ -1035,6 +1038,7 @@ fn force_change_to_new_set() {
let full_client = peer.client().as_full().expect("only full clients are used in test");
let set: AuthoritySet<Hash, BlockNumber> = crate::aux_schema::load_authorities(
#[allow(deprecated)]
&**full_client.backend()
).unwrap();
@@ -1288,6 +1292,7 @@ fn voter_persists_its_votes() {
assert_eq!(net.lock().peer(0).client().info().unwrap().chain.best_number, 40,
"Peer #{} failed to sync", 0);
#[allow(deprecated)]
let block_30_hash =
net.lock().peer(0).client().as_full().unwrap().backend().blockchain().hash(30).unwrap().unwrap();