mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 15:11:02 +00:00
sp-utils => sc-utils (#9677)
* sp-utils => sc-utils * cargo fmt * These files are now in the client so should be licensed as GPL3 * Apply suggestions from code review Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -27,7 +27,7 @@ parity-scale-codec = { version = "2.0.0", features = ["derive"] }
|
||||
sp-application-crypto = { version = "4.0.0-dev", path = "../../primitives/application-crypto" }
|
||||
sp-arithmetic = { version = "4.0.0-dev", path = "../../primitives/arithmetic" }
|
||||
sp-runtime = { version = "4.0.0-dev", path = "../../primitives/runtime" }
|
||||
sp-utils = { version = "4.0.0-dev", path = "../../primitives/utils" }
|
||||
sc-utils = { version = "4.0.0-dev", path = "../utils" }
|
||||
sp-consensus = { version = "0.10.0-dev", path = "../../primitives/consensus/common" }
|
||||
sc-consensus = { version = "0.10.0-dev", path = "../consensus/common" }
|
||||
sp-core = { version = "4.0.0-dev", path = "../../primitives/core" }
|
||||
|
||||
@@ -94,7 +94,7 @@ use log::{debug, trace};
|
||||
use prometheus_endpoint::{register, CounterVec, Opts, PrometheusError, Registry, U64};
|
||||
use rand::seq::SliceRandom;
|
||||
use sc_telemetry::{telemetry, TelemetryHandle, CONSENSUS_DEBUG};
|
||||
use sp_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
use sc_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
|
||||
use super::{benefit, cost, Round, SetId};
|
||||
use crate::{environment, CatchUp, CompactCommit, SignedMessage};
|
||||
|
||||
@@ -58,8 +58,8 @@ use crate::{
|
||||
use gossip::{
|
||||
FullCatchUpMessage, FullCommitMessage, GossipMessage, GossipValidator, PeerReport, VoteMessage,
|
||||
};
|
||||
use sc_utils::mpsc::TracingUnboundedReceiver;
|
||||
use sp_finality_grandpa::{AuthorityId, AuthoritySignature, RoundNumber, SetId as SetIdNumber};
|
||||
use sp_utils::mpsc::TracingUnboundedReceiver;
|
||||
|
||||
pub mod gossip;
|
||||
mod periodic;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
use futures::{future::FutureExt as _, prelude::*, ready, stream::Stream};
|
||||
use futures_timer::Delay;
|
||||
use log::debug;
|
||||
use sp_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
use sc_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
use std::{
|
||||
pin::Pin,
|
||||
task::{Context, Poll},
|
||||
|
||||
@@ -28,10 +28,10 @@ use parity_scale_codec::Encode;
|
||||
use sc_network::{config::Role, Event as NetworkEvent, ObservedRole, PeerId};
|
||||
use sc_network_gossip::Validator;
|
||||
use sc_network_test::{Block, Hash};
|
||||
use sc_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
use sp_finality_grandpa::AuthorityList;
|
||||
use sp_keyring::Ed25519Keyring;
|
||||
use sp_runtime::traits::NumberFor;
|
||||
use sp_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
use std::{
|
||||
borrow::Cow,
|
||||
pin::Pin,
|
||||
|
||||
@@ -27,6 +27,7 @@ use sc_consensus::{
|
||||
BlockCheckParams, BlockImport, BlockImportParams, ImportResult, JustificationImport,
|
||||
};
|
||||
use sc_telemetry::TelemetryHandle;
|
||||
use sc_utils::mpsc::TracingUnboundedSender;
|
||||
use sp_api::{Core, RuntimeApiInfo, TransactionFor};
|
||||
use sp_blockchain::{well_known_cache_keys, BlockStatus};
|
||||
use sp_consensus::{BlockOrigin, Error as ConsensusError, SelectChain};
|
||||
@@ -37,7 +38,6 @@ use sp_runtime::{
|
||||
traits::{Block as BlockT, DigestFor, Header as HeaderT, NumberFor, Zero},
|
||||
Justification,
|
||||
};
|
||||
use sp_utils::mpsc::TracingUnboundedSender;
|
||||
|
||||
use crate::{
|
||||
authorities::{AuthoritySet, DelayKind, PendingChange, SharedAuthoritySet},
|
||||
|
||||
@@ -68,6 +68,7 @@ use sc_client_api::{
|
||||
};
|
||||
use sc_consensus::BlockImport;
|
||||
use sc_telemetry::{telemetry, TelemetryHandle, CONSENSUS_DEBUG, CONSENSUS_INFO};
|
||||
use sc_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver};
|
||||
use sp_api::ProvideRuntimeApi;
|
||||
use sp_application_crypto::AppKey;
|
||||
use sp_blockchain::{Error as ClientError, HeaderBackend, HeaderMetadata};
|
||||
@@ -78,7 +79,6 @@ use sp_runtime::{
|
||||
generic::BlockId,
|
||||
traits::{Block as BlockT, DigestFor, NumberFor, Zero},
|
||||
};
|
||||
use sp_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver};
|
||||
|
||||
pub use finality_grandpa::BlockNumberOps;
|
||||
use finality_grandpa::{voter, voter_set::VoterSet, Error as GrandpaError};
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
use parking_lot::Mutex;
|
||||
use std::sync::Arc;
|
||||
|
||||
use sc_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
use sp_runtime::traits::Block as BlockT;
|
||||
use sp_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
|
||||
use crate::{justification::GrandpaJustification, Error};
|
||||
|
||||
|
||||
@@ -29,12 +29,12 @@ use log::{debug, info, warn};
|
||||
|
||||
use sc_client_api::backend::Backend;
|
||||
use sc_telemetry::TelemetryHandle;
|
||||
use sc_utils::mpsc::TracingUnboundedReceiver;
|
||||
use sp_blockchain::HeaderMetadata;
|
||||
use sp_consensus::SelectChain;
|
||||
use sp_finality_grandpa::AuthorityId;
|
||||
use sp_keystore::SyncCryptoStorePtr;
|
||||
use sp_runtime::traits::{Block as BlockT, NumberFor};
|
||||
use sp_utils::mpsc::TracingUnboundedReceiver;
|
||||
|
||||
use crate::{
|
||||
authorities::SharedAuthoritySet,
|
||||
@@ -403,8 +403,8 @@ mod tests {
|
||||
};
|
||||
use assert_matches::assert_matches;
|
||||
use sc_network::PeerId;
|
||||
use sc_utils::mpsc::tracing_unbounded;
|
||||
use sp_blockchain::HeaderBackend as _;
|
||||
use sp_utils::mpsc::tracing_unbounded;
|
||||
use substrate_test_runtime_client::{TestClientBuilder, TestClientBuilderExt};
|
||||
|
||||
use futures::executor;
|
||||
|
||||
@@ -37,9 +37,9 @@ use log::{debug, warn};
|
||||
use parking_lot::Mutex;
|
||||
use prometheus_endpoint::{register, Gauge, PrometheusError, Registry, U64};
|
||||
use sc_client_api::{BlockImportNotification, ImportNotifications};
|
||||
use sc_utils::mpsc::TracingUnboundedReceiver;
|
||||
use sp_finality_grandpa::AuthorityId;
|
||||
use sp_runtime::traits::{Block as BlockT, Header as HeaderT, NumberFor};
|
||||
use sp_utils::mpsc::TracingUnboundedReceiver;
|
||||
|
||||
use std::{
|
||||
collections::{HashMap, VecDeque},
|
||||
@@ -561,8 +561,8 @@ mod tests {
|
||||
use futures::future::Either;
|
||||
use futures_timer::Delay;
|
||||
use sc_client_api::BlockImportNotification;
|
||||
use sc_utils::mpsc::{tracing_unbounded, TracingUnboundedSender};
|
||||
use sp_consensus::BlockOrigin;
|
||||
use sp_utils::mpsc::{tracing_unbounded, TracingUnboundedSender};
|
||||
use substrate_test_runtime_client::runtime::{Block, Hash, Header};
|
||||
|
||||
#[derive(Clone)]
|
||||
|
||||
Reference in New Issue
Block a user