mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 00:01:09 +00:00
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:
committed by
Tomasz Drwięga
parent
b10ecd7931
commit
22d3043917
@@ -1884,6 +1884,7 @@ pub(crate) mod tests {
|
||||
let client = test_client::new();
|
||||
|
||||
let genesis_hash = client.info().unwrap().chain.genesis_hash;
|
||||
#[allow(deprecated)]
|
||||
let longest_chain_select = test_client::client::LongestChain::new(
|
||||
client.backend().clone(),
|
||||
client.import_lock()
|
||||
@@ -1902,7 +1903,9 @@ pub(crate) mod tests {
|
||||
let client = test_client::new();
|
||||
|
||||
let uninserted_block = client.new_block().unwrap().bake().unwrap();
|
||||
#[allow(deprecated)]
|
||||
let backend = client.backend().as_in_memory();
|
||||
#[allow(deprecated)]
|
||||
let longest_chain_select = test_client::client::LongestChain::new(
|
||||
Arc::new(backend),
|
||||
client.import_lock());
|
||||
@@ -2038,7 +2041,7 @@ pub(crate) mod tests {
|
||||
client.import(BlockOrigin::Own, a2.clone()).unwrap();
|
||||
|
||||
let genesis_hash = client.info().unwrap().chain.genesis_hash;
|
||||
|
||||
#[allow(deprecated)]
|
||||
let longest_chain_select = test_client::client::LongestChain::new(
|
||||
Arc::new(client.backend().as_in_memory()),
|
||||
client.import_lock());
|
||||
@@ -2127,6 +2130,7 @@ pub(crate) mod tests {
|
||||
assert_eq!(client.info().unwrap().chain.best_hash, a5.hash());
|
||||
|
||||
let genesis_hash = client.info().unwrap().chain.genesis_hash;
|
||||
#[allow(deprecated)]
|
||||
let longest_chain_select = test_client::client::LongestChain::new(
|
||||
Arc::new(client.backend().as_in_memory()),
|
||||
client.import_lock());
|
||||
@@ -2357,6 +2361,7 @@ pub(crate) mod tests {
|
||||
client.import(BlockOrigin::Own, a2.clone()).unwrap();
|
||||
|
||||
let genesis_hash = client.info().unwrap().chain.genesis_hash;
|
||||
#[allow(deprecated)]
|
||||
let longest_chain_select = test_client::client::LongestChain::new(
|
||||
Arc::new(client.backend().as_in_memory()),
|
||||
client.import_lock()
|
||||
@@ -2400,23 +2405,26 @@ pub(crate) mod tests {
|
||||
let a3 = client.new_block_at(&BlockId::Hash(a2.hash())).unwrap().bake().unwrap();
|
||||
client.import_justified(BlockOrigin::Own, a3.clone(), justification.clone()).unwrap();
|
||||
|
||||
#[allow(deprecated)]
|
||||
let blockchain = client.backend().blockchain();
|
||||
|
||||
assert_eq!(
|
||||
client.backend().blockchain().last_finalized().unwrap(),
|
||||
blockchain.last_finalized().unwrap(),
|
||||
a3.hash(),
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
client.backend().blockchain().justification(BlockId::Hash(a3.hash())).unwrap(),
|
||||
blockchain.justification(BlockId::Hash(a3.hash())).unwrap(),
|
||||
Some(justification),
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
client.backend().blockchain().justification(BlockId::Hash(a1.hash())).unwrap(),
|
||||
blockchain.justification(BlockId::Hash(a1.hash())).unwrap(),
|
||||
None,
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
client.backend().blockchain().justification(BlockId::Hash(a2.hash())).unwrap(),
|
||||
blockchain.justification(BlockId::Hash(a2.hash())).unwrap(),
|
||||
None,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user