mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 19:21:13 +00:00
Migrate basic-authorship, cli and client-db crates to 2018 edition (#1529)
This commit is contained in:
committed by
Gav Wood
parent
ac065a96ba
commit
28c37ef419
+6
-4
@@ -41,12 +41,14 @@
|
||||
|
||||
use std::collections::BTreeSet;
|
||||
|
||||
use log::warn;
|
||||
|
||||
use client::error::{ErrorKind as ClientErrorKind, Result as ClientResult};
|
||||
use runtime_primitives::traits::{Block as BlockT, NumberFor, As, Zero};
|
||||
|
||||
use cache::{CacheItemT, ComplexBlockId};
|
||||
use cache::list_entry::{Entry, StorageEntry};
|
||||
use cache::list_storage::{Storage, StorageTransaction, Metadata};
|
||||
use crate::cache::{CacheItemT, ComplexBlockId};
|
||||
use crate::cache::list_entry::{Entry, StorageEntry};
|
||||
use crate::cache::list_storage::{Storage, StorageTransaction, Metadata};
|
||||
|
||||
/// List-based cache.
|
||||
pub struct ListCache<Block: BlockT, T: CacheItemT, S: Storage<Block, T>> {
|
||||
@@ -585,7 +587,7 @@ fn read_forks<Block: BlockT, T: CacheItemT, S: Storage<Block, T>>(
|
||||
pub mod tests {
|
||||
use runtime_primitives::testing::{Header, Block as RawBlock, ExtrinsicWrapper};
|
||||
use runtime_primitives::traits::Header as HeaderT;
|
||||
use cache::list_storage::tests::{DummyStorage, FaultyStorage, DummyTransaction};
|
||||
use crate::cache::list_storage::tests::{DummyStorage, FaultyStorage, DummyTransaction};
|
||||
use super::*;
|
||||
|
||||
type Block = RawBlock<ExtrinsicWrapper<u64>>;
|
||||
|
||||
+5
-4
@@ -18,9 +18,10 @@
|
||||
|
||||
use client::error::Result as ClientResult;
|
||||
use runtime_primitives::traits::{Block as BlockT, NumberFor};
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
|
||||
use cache::{CacheItemT, ComplexBlockId};
|
||||
use cache::list_storage::{Storage};
|
||||
use crate::cache::{CacheItemT, ComplexBlockId};
|
||||
use crate::cache::list_storage::{Storage};
|
||||
|
||||
/// Single list-based cache entry.
|
||||
#[derive(Debug)]
|
||||
@@ -112,8 +113,8 @@ impl<Block: BlockT, T: CacheItemT> StorageEntry<Block, T> {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use cache::list_cache::tests::test_id;
|
||||
use cache::list_storage::tests::{DummyStorage, FaultyStorage};
|
||||
use crate::cache::list_cache::tests::test_id;
|
||||
use crate::cache::list_storage::tests::{DummyStorage, FaultyStorage};
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
|
||||
+5
-5
@@ -21,14 +21,14 @@ use std::sync::Arc;
|
||||
use kvdb::{KeyValueDB, DBTransaction};
|
||||
|
||||
use client::error::{Error as ClientError, ErrorKind as ClientErrorKind, Result as ClientResult};
|
||||
use codec::{Encode, Decode};
|
||||
use parity_codec::{Encode, Decode};
|
||||
use runtime_primitives::generic::BlockId;
|
||||
use runtime_primitives::traits::{Block as BlockT, Header as HeaderT, NumberFor};
|
||||
use utils::{self, db_err, meta_keys};
|
||||
use crate::utils::{self, db_err, meta_keys};
|
||||
|
||||
use cache::{CacheItemT, ComplexBlockId};
|
||||
use cache::list_cache::{CommitOperation, Fork};
|
||||
use cache::list_entry::{Entry, StorageEntry};
|
||||
use crate::cache::{CacheItemT, ComplexBlockId};
|
||||
use crate::cache::list_cache::{CommitOperation, Fork};
|
||||
use crate::cache::list_entry::{Entry, StorageEntry};
|
||||
|
||||
/// Single list-cache metadata.
|
||||
#[derive(Debug)]
|
||||
|
||||
+3
-2
@@ -23,10 +23,11 @@ use kvdb::{KeyValueDB, DBTransaction};
|
||||
|
||||
use client::blockchain::Cache as BlockchainCache;
|
||||
use client::error::Result as ClientResult;
|
||||
use codec::{Encode, Decode};
|
||||
use parity_codec::{Encode, Decode};
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
use runtime_primitives::generic::BlockId;
|
||||
use runtime_primitives::traits::{Block as BlockT, Header as HeaderT, NumberFor, As, AuthorityIdFor};
|
||||
use utils::{self, COLUMN_META};
|
||||
use crate::utils::{self, COLUMN_META};
|
||||
|
||||
use self::list_cache::ListCache;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user