mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-24 16:01:08 +00:00
Migrate rpc-servers, serializer, service and sr-io to the 2018 edition (#1732)
This commit is contained in:
committed by
Bastian Köcher
parent
91114c6c11
commit
31188dc013
@@ -18,6 +18,7 @@
|
||||
|
||||
use std::{self, io::{Read, Write}};
|
||||
use futures::Future;
|
||||
use log::{info, warn};
|
||||
|
||||
use runtime_primitives::generic::{SignedBlock, BlockId};
|
||||
use runtime_primitives::traits::{As, Block, Header};
|
||||
@@ -25,11 +26,11 @@ use consensus_common::import_queue::{ImportQueue, IncomingBlock, Link};
|
||||
use network::message;
|
||||
|
||||
use consensus_common::BlockOrigin;
|
||||
use components::{self, Components, ServiceFactory, FactoryFullConfiguration, FactoryBlockNumber, RuntimeGenesis};
|
||||
use new_client;
|
||||
use codec::{Decode, Encode};
|
||||
use error;
|
||||
use chain_spec::ChainSpec;
|
||||
use crate::components::{self, Components, ServiceFactory, FactoryFullConfiguration, FactoryBlockNumber, RuntimeGenesis};
|
||||
use crate::new_client;
|
||||
use parity_codec::{Decode, Encode};
|
||||
use crate::error;
|
||||
use crate::chain_spec::ChainSpec;
|
||||
|
||||
/// Export a range of blocks to a binary stream.
|
||||
pub fn export_blocks<F, E, W>(
|
||||
|
||||
@@ -19,10 +19,11 @@
|
||||
use std::collections::HashMap;
|
||||
use std::fs::File;
|
||||
use std::path::PathBuf;
|
||||
use serde_derive::{Serialize, Deserialize};
|
||||
use primitives::storage::{StorageKey, StorageData};
|
||||
use runtime_primitives::{BuildStorage, StorageMap, ChildrenStorageMap};
|
||||
use serde_json as json;
|
||||
use components::RuntimeGenesis;
|
||||
use crate::components::RuntimeGenesis;
|
||||
use network::Multiaddr;
|
||||
|
||||
enum GenesisSource<G> {
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
use std::{sync::Arc, net::SocketAddr, marker::PhantomData, ops::Deref, ops::DerefMut};
|
||||
use serde::{Serialize, de::DeserializeOwned};
|
||||
use tokio::runtime::TaskExecutor;
|
||||
use chain_spec::ChainSpec;
|
||||
use crate::chain_spec::ChainSpec;
|
||||
use client_db;
|
||||
use client::{self, Client, runtime_api::{Metadata, TaggedTransactionQueue}};
|
||||
use {error, Service, maybe_start_server};
|
||||
use crate::{error, Service, maybe_start_server};
|
||||
use consensus_common::import_queue::ImportQueue;
|
||||
use network::{self, OnDemand};
|
||||
use substrate_executor::{NativeExecutor, NativeExecutionDispatch};
|
||||
@@ -30,7 +30,7 @@ use transaction_pool::txpool::{self, Options as TransactionPoolOptions, Pool as
|
||||
use runtime_primitives::{
|
||||
BuildStorage, traits::{Block as BlockT, Header as HeaderT, ProvideRuntimeApi}, generic::BlockId
|
||||
};
|
||||
use config::Configuration;
|
||||
use crate::config::Configuration;
|
||||
use primitives::{Blake2Hasher, H256};
|
||||
use rpc::{self, apis::system::SystemInfo};
|
||||
use parking_lot::Mutex;
|
||||
@@ -535,7 +535,7 @@ impl<Factory: ServiceFactory> Components for LightComponents<Factory> {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use codec::Encode;
|
||||
use parity_codec::Encode;
|
||||
use consensus_common::BlockOrigin;
|
||||
use substrate_test_client::{
|
||||
self,
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
use std::net::SocketAddr;
|
||||
use transaction_pool;
|
||||
use chain_spec::ChainSpec;
|
||||
use crate::chain_spec::ChainSpec;
|
||||
pub use client::ExecutionStrategy;
|
||||
pub use client_db::PruningMode;
|
||||
pub use network::config::{NetworkConfiguration, Roles};
|
||||
|
||||
@@ -24,6 +24,7 @@ use client;
|
||||
use network;
|
||||
use keystore;
|
||||
use consensus_common;
|
||||
use error_chain::*;
|
||||
|
||||
error_chain! {
|
||||
foreign_links {
|
||||
|
||||
@@ -19,39 +19,6 @@
|
||||
|
||||
#![warn(unused_extern_crates)]
|
||||
|
||||
extern crate futures;
|
||||
extern crate exit_future;
|
||||
extern crate serde;
|
||||
extern crate serde_json;
|
||||
extern crate parking_lot;
|
||||
extern crate substrate_keystore as keystore;
|
||||
extern crate substrate_primitives as primitives;
|
||||
extern crate sr_primitives as runtime_primitives;
|
||||
extern crate substrate_consensus_common as consensus_common;
|
||||
extern crate substrate_network as network;
|
||||
extern crate substrate_executor;
|
||||
extern crate substrate_client as client;
|
||||
extern crate substrate_client_db as client_db;
|
||||
extern crate parity_codec as codec;
|
||||
extern crate substrate_transaction_pool as transaction_pool;
|
||||
extern crate substrate_rpc_servers as rpc;
|
||||
extern crate target_info;
|
||||
extern crate tokio;
|
||||
|
||||
#[macro_use]
|
||||
extern crate substrate_telemetry as tel;
|
||||
#[macro_use]
|
||||
extern crate error_chain;
|
||||
#[macro_use]
|
||||
extern crate slog; // needed until we can reexport `slog_info` from `substrate_telemetry`
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
|
||||
#[cfg(test)]
|
||||
extern crate substrate_test_client;
|
||||
|
||||
mod components;
|
||||
mod error;
|
||||
mod chain_spec;
|
||||
@@ -63,6 +30,7 @@ use std::net::SocketAddr;
|
||||
use std::collections::HashMap;
|
||||
#[doc(hidden)]
|
||||
pub use std::{ops::Deref, result::Result, sync::Arc};
|
||||
use log::{info, warn, debug};
|
||||
use futures::prelude::*;
|
||||
use keystore::Store as Keystore;
|
||||
use client::BlockchainEvents;
|
||||
@@ -72,7 +40,8 @@ use exit_future::Signal;
|
||||
#[doc(hidden)]
|
||||
pub use tokio::runtime::TaskExecutor;
|
||||
use substrate_executor::NativeExecutor;
|
||||
use codec::{Encode, Decode};
|
||||
use parity_codec::{Encode, Decode};
|
||||
use tel::telemetry;
|
||||
|
||||
pub use self::error::{ErrorKind, Error};
|
||||
pub use config::{Configuration, Roles, PruningMode};
|
||||
|
||||
Reference in New Issue
Block a user