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
@@ -23,8 +23,8 @@ use polkadot_primitives::v2::SessionIndex;
use futures::channel::oneshot;
use polkadot_node_subsystem::{ChainApiError, SubsystemError};
use polkadot_node_subsystem_util::runtime;
use polkadot_subsystem::{ChainApiError, SubsystemError};
use crate::LOG_TARGET;
@@ -19,7 +19,7 @@ use futures::{future::Either, FutureExt, StreamExt, TryFutureExt};
use sp_keystore::SyncCryptoStorePtr;
use polkadot_node_network_protocol::request_response::{v1, IncomingRequestReceiver};
use polkadot_subsystem::{
use polkadot_node_subsystem::{
messages::AvailabilityDistributionMessage, overseer, FromOverseer, OverseerSignal,
SpawnedSubsystem, SubsystemContext, SubsystemError,
};
@@ -24,13 +24,13 @@ use polkadot_node_network_protocol::request_response::{
OutgoingRequest, Recipient,
};
use polkadot_node_primitives::PoV;
use polkadot_node_subsystem_util::runtime::RuntimeInfo;
use polkadot_primitives::v2::{AuthorityDiscoveryId, CandidateHash, Hash, ValidatorIndex};
use polkadot_subsystem::{
use polkadot_node_subsystem::{
jaeger,
messages::{IfDisconnected, NetworkBridgeMessage},
SubsystemContext,
};
use polkadot_node_subsystem_util::runtime::RuntimeInfo;
use polkadot_primitives::v2::{AuthorityDiscoveryId, CandidateHash, Hash, ValidatorIndex};
use crate::{
error::{Error, FatalError, JfyiError, Result},
@@ -133,11 +133,11 @@ mod tests {
use sp_core::testing::TaskExecutor;
use polkadot_node_primitives::BlockData;
use polkadot_primitives::v2::{CandidateHash, Hash, ValidatorIndex};
use polkadot_subsystem::messages::{
use polkadot_node_subsystem::messages::{
AllMessages, AvailabilityDistributionMessage, RuntimeApiMessage, RuntimeApiRequest,
};
use polkadot_subsystem_testhelpers as test_helpers;
use polkadot_node_subsystem_test_helpers as test_helpers;
use polkadot_primitives::v2::{CandidateHash, Hash, ValidatorIndex};
use test_helpers::mock::make_ferdie_keystore;
use super::*;
@@ -28,15 +28,15 @@ use polkadot_node_network_protocol::request_response::{
v1::{ChunkFetchingRequest, ChunkFetchingResponse},
};
use polkadot_node_primitives::ErasureChunk;
use polkadot_primitives::v2::{
AuthorityDiscoveryId, BlakeTwo256, CandidateHash, GroupIndex, Hash, HashT, OccupiedCore,
SessionIndex,
};
use polkadot_subsystem::{
use polkadot_node_subsystem::{
jaeger,
messages::{AllMessages, AvailabilityStoreMessage, IfDisconnected, NetworkBridgeMessage},
SubsystemContext,
};
use polkadot_primitives::v2::{
AuthorityDiscoveryId, BlakeTwo256, CandidateHash, GroupIndex, Hash, HashT, OccupiedCore,
SessionIndex,
};
use crate::{
error::{FatalError, Result},
@@ -30,6 +30,7 @@ use sp_keyring::Sr25519Keyring;
use polkadot_node_network_protocol::request_response::{v1, Recipient};
use polkadot_node_primitives::{BlockData, PoV, Proof};
use polkadot_node_subsystem::messages::AllMessages;
use polkadot_primitives::v2::{CandidateHash, ValidatorIndex};
use super::*;
@@ -32,12 +32,12 @@ use futures::{
Stream,
};
use polkadot_node_subsystem_util::runtime::{get_occupied_cores, RuntimeInfo};
use polkadot_primitives::v2::{CandidateHash, Hash, OccupiedCore, SessionIndex};
use polkadot_subsystem::{
use polkadot_node_subsystem::{
messages::{AllMessages, ChainApiMessage},
ActivatedLeaf, ActiveLeavesUpdate, LeafStatus, SubsystemContext,
};
use polkadot_node_subsystem_util::runtime::{get_occupied_cores, RuntimeInfo};
use polkadot_primitives::v2::{CandidateHash, Hash, OccupiedCore, SessionIndex};
use super::{FatalError, Metrics, Result, LOG_TARGET};
@@ -19,11 +19,11 @@ use std::collections::HashSet;
use lru::LruCache;
use rand::{seq::SliceRandom, thread_rng};
use polkadot_node_subsystem::SubsystemContext;
use polkadot_node_subsystem_util::runtime::RuntimeInfo;
use polkadot_primitives::v2::{
AuthorityDiscoveryId, GroupIndex, Hash, SessionIndex, ValidatorIndex,
};
use polkadot_subsystem::SubsystemContext;
use crate::{
error::{Error, Result},
@@ -25,14 +25,14 @@ use polkadot_primitives::v2::{
BlockNumber, CoreState, GroupIndex, Hash, Id, ScheduledCore, SessionIndex, SessionInfo,
};
use polkadot_subsystem::{
use polkadot_node_subsystem::{
messages::{
AllMessages, AvailabilityDistributionMessage, AvailabilityStoreMessage, ChainApiMessage,
NetworkBridgeMessage, RuntimeApiMessage, RuntimeApiRequest,
},
ActivatedLeaf, ActiveLeavesUpdate, LeafStatus,
};
use polkadot_subsystem_testhelpers::{
use polkadot_node_subsystem_test_helpers::{
make_subsystem_context, mock::make_ferdie_keystore, TestSubsystemContext,
TestSubsystemContextHandle,
};
@@ -26,8 +26,8 @@ use polkadot_node_network_protocol::{
UnifiedReputationChange as Rep,
};
use polkadot_node_primitives::{AvailableData, ErasureChunk};
use polkadot_node_subsystem::{jaeger, messages::AvailabilityStoreMessage, SubsystemSender};
use polkadot_primitives::v2::{CandidateHash, ValidatorIndex};
use polkadot_subsystem::{jaeger, messages::AvailabilityStoreMessage, SubsystemSender};
use crate::{
error::{JfyiError, Result},
@@ -22,7 +22,7 @@ use polkadot_node_network_protocol::request_response::IncomingRequest;
use polkadot_primitives::v2::CoreState;
use sp_keystore::SyncCryptoStorePtr;
use polkadot_subsystem_testhelpers as test_helpers;
use polkadot_node_subsystem_test_helpers as test_helpers;
use super::*;
@@ -20,8 +20,8 @@ use std::{
time::Duration,
};
use polkadot_node_subsystem_test_helpers::TestSubsystemContextHandle;
use polkadot_node_subsystem_util::TimeoutExt;
use polkadot_subsystem_testhelpers::TestSubsystemContextHandle;
use futures::{
channel::{mpsc, oneshot},
@@ -39,18 +39,18 @@ use polkadot_node_network_protocol::{
request_response::{v1, IncomingRequest, OutgoingRequest, Requests},
};
use polkadot_node_primitives::ErasureChunk;
use polkadot_primitives::v2::{
CandidateHash, CoreState, GroupIndex, Hash, Id as ParaId, ScheduledCore, SessionInfo,
ValidatorIndex,
};
use polkadot_subsystem::{
use polkadot_node_subsystem::{
messages::{
AllMessages, AvailabilityDistributionMessage, AvailabilityStoreMessage, ChainApiMessage,
NetworkBridgeMessage, RuntimeApiMessage, RuntimeApiRequest,
},
ActivatedLeaf, ActiveLeavesUpdate, FromOverseer, LeafStatus, OverseerSignal,
};
use polkadot_subsystem_testhelpers as test_helpers;
use polkadot_node_subsystem_test_helpers as test_helpers;
use polkadot_primitives::v2::{
CandidateHash, CoreState, GroupIndex, Hash, Id as ParaId, ScheduledCore, SessionInfo,
ValidatorIndex,
};
use test_helpers::{mock::make_ferdie_keystore, SingleItemSink};
use super::mock::{make_session_info, OccupiedCoreBuilder};