polkadot-node-subsystem package rename mish mash cleanup (#5502)

* unify to polkadot-node-subsystem{,-test-helpers}

* chore: fmt
This commit is contained in:
Bernhard Schuster
2022-05-11 17:32:38 +02:00
committed by GitHub
parent b67b7fa355
commit d437a33e0b
59 changed files with 170 additions and 169 deletions
@@ -17,8 +17,8 @@
//! Error handling related code and Error/Result definitions.
use polkadot_node_subsystem::SubsystemError;
use polkadot_node_subsystem_util::runtime;
use polkadot_subsystem::SubsystemError;
use crate::{sender, LOG_TARGET};
@@ -31,11 +31,11 @@ use sp_keystore::SyncCryptoStorePtr;
use polkadot_node_network_protocol::request_response::{incoming::IncomingRequestReceiver, v1};
use polkadot_node_primitives::DISPUTE_WINDOW;
use polkadot_node_subsystem_util::{runtime, runtime::RuntimeInfo};
use polkadot_subsystem::{
use polkadot_node_subsystem::{
messages::DisputeDistributionMessage, overseer, FromOverseer, OverseerSignal, SpawnedSubsystem,
SubsystemContext, SubsystemError,
};
use polkadot_node_subsystem_util::{runtime, runtime::RuntimeInfo};
/// ## The sender [`DisputeSender`]
///
@@ -39,11 +39,11 @@ use polkadot_node_network_protocol::{
PeerId, UnifiedReputationChange as Rep,
};
use polkadot_node_primitives::DISPUTE_WINDOW;
use polkadot_node_subsystem_util::{runtime, runtime::RuntimeInfo};
use polkadot_subsystem::{
use polkadot_node_subsystem::{
messages::{AllMessages, DisputeCoordinatorMessage, ImportStatementsResult},
SubsystemSender,
};
use polkadot_node_subsystem_util::{runtime, runtime::RuntimeInfo};
use crate::{
metrics::{FAILED, SUCCEEDED},
@@ -18,8 +18,8 @@
//! Error handling related code and Error/Result definitions.
use polkadot_node_primitives::disputes::DisputeMessageCheckError;
use polkadot_node_subsystem::SubsystemError;
use polkadot_node_subsystem_util::runtime;
use polkadot_subsystem::SubsystemError;
#[allow(missing_docs)]
#[fatality::fatality(splitable)]
@@ -20,12 +20,12 @@ use futures::channel::{mpsc, oneshot};
use polkadot_node_network_protocol::request_response::v1::DisputeRequest;
use polkadot_node_primitives::{CandidateVotes, DisputeMessage, SignedDisputeStatement};
use polkadot_node_subsystem_util::runtime::RuntimeInfo;
use polkadot_primitives::v2::{CandidateHash, DisputeStatement, Hash, SessionIndex};
use polkadot_subsystem::{
use polkadot_node_subsystem::{
messages::{AllMessages, DisputeCoordinatorMessage},
ActiveLeavesUpdate, SubsystemContext,
};
use polkadot_node_subsystem_util::runtime::RuntimeInfo;
use polkadot_primitives::v2::{CandidateHash, DisputeStatement, Hash, SessionIndex};
/// For each ongoing dispute we have a `SendTask` which takes care of it.
///
@@ -26,14 +26,14 @@ use polkadot_node_network_protocol::{
},
IfDisconnected,
};
use polkadot_node_subsystem::{
messages::{AllMessages, NetworkBridgeMessage},
SubsystemContext,
};
use polkadot_node_subsystem_util::{metrics, runtime::RuntimeInfo};
use polkadot_primitives::v2::{
AuthorityDiscoveryId, CandidateHash, Hash, SessionIndex, ValidatorIndex,
};
use polkadot_subsystem::{
messages::{AllMessages, NetworkBridgeMessage},
SubsystemContext,
};
use super::error::{FatalError, Result};
@@ -41,19 +41,19 @@ use polkadot_node_network_protocol::{
IfDisconnected,
};
use polkadot_node_primitives::{CandidateVotes, UncheckedDisputeMessage};
use polkadot_primitives::v2::{
AuthorityDiscoveryId, CandidateHash, Hash, SessionIndex, SessionInfo,
};
use polkadot_subsystem::{
use polkadot_node_subsystem::{
messages::{
AllMessages, DisputeCoordinatorMessage, DisputeDistributionMessage, ImportStatementsResult,
NetworkBridgeMessage, RuntimeApiMessage, RuntimeApiRequest,
},
ActivatedLeaf, ActiveLeavesUpdate, FromOverseer, LeafStatus, OverseerSignal, Span,
};
use polkadot_subsystem_testhelpers::{
use polkadot_node_subsystem_test_helpers::{
mock::make_ferdie_keystore, subsystem_test_harness, TestSubsystemContextHandle,
};
use polkadot_primitives::v2::{
AuthorityDiscoveryId, CandidateHash, Hash, SessionIndex, SessionInfo,
};
use self::mock::{
make_candidate_receipt, make_dispute_message, ALICE_INDEX, FERDIE_DISCOVERY_KEY, FERDIE_INDEX,