mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-20 15:05:40 +00:00
Re-export current primitives in crate root (#6487)
* Re-export current primitives in crate root * Add missing exports * restart CI
This commit is contained in:
@@ -37,7 +37,7 @@ use polkadot_node_subsystem::{
|
||||
},
|
||||
overseer, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, SpawnedSubsystem, SubsystemError,
|
||||
};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
BlockNumber, CandidateIndex, Hash, SessionIndex, ValidatorIndex, ValidatorSignature,
|
||||
};
|
||||
use rand::{CryptoRng, Rng, SeedableRng};
|
||||
|
||||
@@ -29,7 +29,7 @@ use polkadot_node_primitives::approval::{
|
||||
use polkadot_node_subsystem::messages::{network_bridge_event, AllMessages, ApprovalCheckError};
|
||||
use polkadot_node_subsystem_test_helpers as test_helpers;
|
||||
use polkadot_node_subsystem_util::TimeoutExt as _;
|
||||
use polkadot_primitives::v2::{AuthorityDiscoveryId, BlakeTwo256, HashT};
|
||||
use polkadot_primitives::{AuthorityDiscoveryId, BlakeTwo256, HashT};
|
||||
use polkadot_primitives_test_helpers::dummy_signature;
|
||||
use rand::SeedableRng;
|
||||
use sp_authority_discovery::AuthorityPair as AuthorityDiscoveryPair;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
use fatality::Nested;
|
||||
use polkadot_node_network_protocol::request_response::outgoing::RequestError;
|
||||
use polkadot_primitives::v2::SessionIndex;
|
||||
use polkadot_primitives::SessionIndex;
|
||||
|
||||
use futures::channel::oneshot;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ use polkadot_node_subsystem::{
|
||||
overseer,
|
||||
};
|
||||
use polkadot_node_subsystem_util::runtime::RuntimeInfo;
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
AuthorityDiscoveryId, CandidateHash, Hash, Id as ParaId, ValidatorIndex,
|
||||
};
|
||||
|
||||
@@ -141,7 +141,7 @@ mod tests {
|
||||
AllMessages, AvailabilityDistributionMessage, RuntimeApiMessage, RuntimeApiRequest,
|
||||
};
|
||||
use polkadot_node_subsystem_test_helpers as test_helpers;
|
||||
use polkadot_primitives::v2::{CandidateHash, Hash, ValidatorIndex};
|
||||
use polkadot_primitives::{CandidateHash, Hash, ValidatorIndex};
|
||||
use test_helpers::mock::make_ferdie_keystore;
|
||||
|
||||
use super::*;
|
||||
|
||||
@@ -33,7 +33,7 @@ use polkadot_node_subsystem::{
|
||||
messages::{AvailabilityStoreMessage, IfDisconnected, NetworkBridgeTxMessage},
|
||||
overseer,
|
||||
};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
AuthorityDiscoveryId, BlakeTwo256, CandidateHash, GroupIndex, Hash, HashT, OccupiedCore,
|
||||
SessionIndex,
|
||||
};
|
||||
|
||||
@@ -31,7 +31,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 polkadot_primitives::{CandidateHash, ValidatorIndex};
|
||||
|
||||
use super::*;
|
||||
use crate::{metrics::Metrics, tests::mock::get_valid_chunk_data};
|
||||
|
||||
@@ -37,7 +37,7 @@ use polkadot_node_subsystem::{
|
||||
overseer, ActivatedLeaf, ActiveLeavesUpdate, LeafStatus,
|
||||
};
|
||||
use polkadot_node_subsystem_util::runtime::{get_occupied_cores, RuntimeInfo};
|
||||
use polkadot_primitives::v2::{CandidateHash, Hash, OccupiedCore, SessionIndex};
|
||||
use polkadot_primitives::{CandidateHash, Hash, OccupiedCore, SessionIndex};
|
||||
|
||||
use super::{FatalError, Metrics, Result, LOG_TARGET};
|
||||
|
||||
|
||||
@@ -21,9 +21,7 @@ use rand::{seq::SliceRandom, thread_rng};
|
||||
|
||||
use polkadot_node_subsystem::overseer;
|
||||
use polkadot_node_subsystem_util::runtime::RuntimeInfo;
|
||||
use polkadot_primitives::v2::{
|
||||
AuthorityDiscoveryId, GroupIndex, Hash, SessionIndex, ValidatorIndex,
|
||||
};
|
||||
use polkadot_primitives::{AuthorityDiscoveryId, GroupIndex, Hash, SessionIndex, ValidatorIndex};
|
||||
|
||||
use crate::{
|
||||
error::{Error, Result},
|
||||
|
||||
@@ -21,7 +21,7 @@ use futures::FutureExt;
|
||||
use polkadot_node_network_protocol::jaeger;
|
||||
use polkadot_node_primitives::{BlockData, ErasureChunk, PoV};
|
||||
use polkadot_node_subsystem_util::runtime::RuntimeInfo;
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
BlockNumber, CoreState, GroupIndex, Hash, Id as ParaId, ScheduledCore, SessionIndex,
|
||||
SessionInfo,
|
||||
};
|
||||
|
||||
@@ -27,7 +27,7 @@ use polkadot_node_network_protocol::{
|
||||
};
|
||||
use polkadot_node_primitives::{AvailableData, ErasureChunk};
|
||||
use polkadot_node_subsystem::{jaeger, messages::AvailabilityStoreMessage, SubsystemSender};
|
||||
use polkadot_primitives::v2::{CandidateHash, ValidatorIndex};
|
||||
use polkadot_primitives::{CandidateHash, ValidatorIndex};
|
||||
|
||||
use crate::{
|
||||
error::{JfyiError, Result},
|
||||
|
||||
@@ -22,7 +22,7 @@ use sp_keyring::Sr25519Keyring;
|
||||
|
||||
use polkadot_erasure_coding::{branches, obtain_chunks_v1 as obtain_chunks};
|
||||
use polkadot_node_primitives::{AvailableData, BlockData, ErasureChunk, PoV, Proof};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
CandidateCommitments, CandidateDescriptor, CandidateHash, CommittedCandidateReceipt,
|
||||
GroupIndex, Hash, HeadData, Id as ParaId, IndexedVec, OccupiedCore, PersistedValidationData,
|
||||
SessionInfo, ValidatorIndex,
|
||||
|
||||
@@ -19,7 +19,7 @@ use std::collections::HashSet;
|
||||
use futures::{executor, future, Future};
|
||||
|
||||
use polkadot_node_network_protocol::request_response::{IncomingRequest, ReqProtocolNames};
|
||||
use polkadot_primitives::v2::{CoreState, Hash};
|
||||
use polkadot_primitives::{CoreState, Hash};
|
||||
use sp_keystore::SyncCryptoStorePtr;
|
||||
|
||||
use polkadot_node_subsystem_test_helpers as test_helpers;
|
||||
|
||||
@@ -47,7 +47,7 @@ use polkadot_node_subsystem::{
|
||||
ActivatedLeaf, ActiveLeavesUpdate, FromOrchestra, LeafStatus, OverseerSignal,
|
||||
};
|
||||
use polkadot_node_subsystem_test_helpers as test_helpers;
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
CandidateHash, CoreState, GroupIndex, Hash, Id as ParaId, ScheduledCore, SessionInfo,
|
||||
ValidatorIndex,
|
||||
};
|
||||
|
||||
@@ -56,7 +56,7 @@ use polkadot_node_subsystem::{
|
||||
SubsystemResult,
|
||||
};
|
||||
use polkadot_node_subsystem_util::request_session_info;
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
AuthorityDiscoveryId, BlakeTwo256, BlockNumber, CandidateHash, CandidateReceipt, GroupIndex,
|
||||
Hash, HashT, IndexedVec, SessionIndex, SessionInfo, ValidatorId, ValidatorIndex,
|
||||
};
|
||||
|
||||
@@ -36,7 +36,7 @@ use polkadot_node_subsystem::{
|
||||
};
|
||||
use polkadot_node_subsystem_test_helpers::{make_subsystem_context, TestSubsystemContextHandle};
|
||||
use polkadot_node_subsystem_util::TimeoutExt;
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
AuthorityDiscoveryId, Hash, HeadData, IndexedVec, PersistedValidationData, ValidatorId,
|
||||
};
|
||||
use polkadot_primitives_test_helpers::{dummy_candidate_receipt, dummy_hash};
|
||||
|
||||
@@ -37,7 +37,7 @@ use polkadot_node_subsystem::{
|
||||
};
|
||||
use polkadot_node_subsystem_util::{self as util};
|
||||
|
||||
use polkadot_primitives::v2::{Hash, SignedAvailabilityBitfield, SigningContext, ValidatorId};
|
||||
use polkadot_primitives::{Hash, SignedAvailabilityBitfield, SigningContext, ValidatorId};
|
||||
use rand::{CryptoRng, Rng, SeedableRng};
|
||||
use std::collections::{HashMap, HashSet};
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ use polkadot_node_subsystem::{
|
||||
};
|
||||
use polkadot_node_subsystem_test_helpers::make_subsystem_context;
|
||||
use polkadot_node_subsystem_util::TimeoutExt;
|
||||
use polkadot_primitives::v2::{AvailabilityBitfield, Signed, ValidatorIndex};
|
||||
use polkadot_primitives::{AvailabilityBitfield, Signed, ValidatorIndex};
|
||||
use rand_chacha::ChaCha12Rng;
|
||||
use sp_application_crypto::AppKey;
|
||||
use sp_authority_discovery::AuthorityPair as AuthorityDiscoveryPair;
|
||||
|
||||
@@ -36,7 +36,7 @@ use polkadot_node_network_protocol::{
|
||||
request_response::{OutgoingRequest, Recipient, ReqProtocolNames, Requests},
|
||||
PeerId, UnifiedReputationChange as Rep,
|
||||
};
|
||||
use polkadot_primitives::v2::{AuthorityDiscoveryId, Block, Hash};
|
||||
use polkadot_primitives::{AuthorityDiscoveryId, Block, Hash};
|
||||
|
||||
use crate::validator_discovery::AuthorityDiscovery;
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ use polkadot_node_subsystem::{
|
||||
overseer, ActivatedLeaf, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, SpawnedSubsystem,
|
||||
};
|
||||
|
||||
use polkadot_primitives::v2::{AuthorityDiscoveryId, BlockNumber, Hash, ValidatorIndex};
|
||||
use polkadot_primitives::{AuthorityDiscoveryId, BlockNumber, Hash, ValidatorIndex};
|
||||
|
||||
/// Peer set info for network initialization.
|
||||
///
|
||||
|
||||
@@ -46,7 +46,7 @@ use polkadot_node_subsystem_test_helpers::{
|
||||
SingleItemSink, SingleItemStream, TestSubsystemContextHandle,
|
||||
};
|
||||
use polkadot_node_subsystem_util::metered;
|
||||
use polkadot_primitives::v2::{AuthorityDiscoveryId, Hash};
|
||||
use polkadot_primitives::{AuthorityDiscoveryId, Hash};
|
||||
|
||||
use sc_network::Multiaddr;
|
||||
use sp_keyring::Sr25519Keyring;
|
||||
|
||||
@@ -32,7 +32,7 @@ use polkadot_node_network_protocol::{
|
||||
use polkadot_node_subsystem::{FromOrchestra, OverseerSignal};
|
||||
use polkadot_node_subsystem_test_helpers::TestSubsystemContextHandle;
|
||||
use polkadot_node_subsystem_util::metered;
|
||||
use polkadot_primitives::v2::{AuthorityDiscoveryId, Hash};
|
||||
use polkadot_primitives::{AuthorityDiscoveryId, Hash};
|
||||
use polkadot_primitives_test_helpers::dummy_collator_signature;
|
||||
use sc_network::Multiaddr;
|
||||
use sp_keyring::Sr25519Keyring;
|
||||
|
||||
@@ -30,7 +30,7 @@ use polkadot_node_network_protocol::{
|
||||
peer_set::{PeerSet, PeerSetProtocolNames, PerPeerSet},
|
||||
PeerId,
|
||||
};
|
||||
use polkadot_primitives::v2::AuthorityDiscoveryId;
|
||||
use polkadot_primitives::AuthorityDiscoveryId;
|
||||
|
||||
const LOG_TARGET: &str = "parachain::validator-discovery";
|
||||
|
||||
@@ -173,7 +173,7 @@ mod tests {
|
||||
request_response::{outgoing::Requests, ReqProtocolNames},
|
||||
PeerId,
|
||||
};
|
||||
use polkadot_primitives::v2::Hash;
|
||||
use polkadot_primitives::Hash;
|
||||
use sc_network::{Event as NetworkEvent, IfDisconnected, ProtocolName};
|
||||
use sp_keyring::Sr25519Keyring;
|
||||
use std::collections::{HashMap, HashSet};
|
||||
|
||||
@@ -47,7 +47,7 @@ use polkadot_node_subsystem_util::{
|
||||
runtime::{get_availability_cores, get_group_rotation_info, RuntimeInfo},
|
||||
TimeoutExt,
|
||||
};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
AuthorityDiscoveryId, CandidateHash, CandidateReceipt, CollatorPair, CoreIndex, CoreState,
|
||||
GroupIndex, Hash, Id as ParaId, SessionIndex,
|
||||
};
|
||||
|
||||
@@ -43,7 +43,7 @@ use polkadot_node_subsystem::{
|
||||
};
|
||||
use polkadot_node_subsystem_test_helpers as test_helpers;
|
||||
use polkadot_node_subsystem_util::TimeoutExt;
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
AuthorityDiscoveryId, CollatorPair, GroupIndex, GroupRotationInfo, IndexedVec, ScheduledCore,
|
||||
SessionIndex, SessionInfo, ValidatorId, ValidatorIndex,
|
||||
};
|
||||
|
||||
@@ -37,7 +37,7 @@ use std::{
|
||||
|
||||
use bitvec::{bitvec, vec::BitVec};
|
||||
|
||||
use polkadot_primitives::v2::{AuthorityDiscoveryId, GroupIndex, Hash, SessionIndex};
|
||||
use polkadot_primitives::{AuthorityDiscoveryId, GroupIndex, Hash, SessionIndex};
|
||||
|
||||
/// The ring buffer stores at most this many unique validator groups.
|
||||
///
|
||||
|
||||
@@ -34,7 +34,7 @@ use polkadot_node_network_protocol::{
|
||||
request_response::{v1 as request_v1, IncomingRequestReceiver},
|
||||
PeerId, UnifiedReputationChange as Rep,
|
||||
};
|
||||
use polkadot_primitives::v2::CollatorPair;
|
||||
use polkadot_primitives::CollatorPair;
|
||||
|
||||
use polkadot_node_subsystem::{
|
||||
errors::SubsystemError, messages::NetworkBridgeTxMessage, overseer, SpawnedSubsystem,
|
||||
|
||||
@@ -53,7 +53,7 @@ use polkadot_node_subsystem::{
|
||||
overseer, FromOrchestra, OverseerSignal, PerLeafSpan, SubsystemSender,
|
||||
};
|
||||
use polkadot_node_subsystem_util::metrics::{self, prometheus};
|
||||
use polkadot_primitives::v2::{CandidateReceipt, CollatorId, Hash, Id as ParaId};
|
||||
use polkadot_primitives::{CandidateReceipt, CollatorId, Hash, Id as ParaId};
|
||||
|
||||
use crate::error::Result;
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ use polkadot_node_primitives::BlockData;
|
||||
use polkadot_node_subsystem::messages::{AllMessages, RuntimeApiMessage, RuntimeApiRequest};
|
||||
use polkadot_node_subsystem_test_helpers as test_helpers;
|
||||
use polkadot_node_subsystem_util::TimeoutExt;
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
CollatorPair, CoreState, GroupIndex, GroupRotationInfo, OccupiedCore, ScheduledCore,
|
||||
ValidatorId, ValidatorIndex,
|
||||
};
|
||||
@@ -133,7 +133,7 @@ fn test_harness<T: Future<Output = VirtualOverseer>>(test: impl FnOnce(TestHarne
|
||||
let keystore = TestKeyStore::new();
|
||||
keystore
|
||||
.sr25519_generate_new(
|
||||
polkadot_primitives::v2::PARACHAIN_KEY_TYPE_ID,
|
||||
polkadot_primitives::PARACHAIN_KEY_TYPE_ID,
|
||||
Some(&Sr25519Keyring::Alice.to_seed()),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
@@ -22,7 +22,7 @@ use polkadot_node_network_protocol::{
|
||||
PeerId,
|
||||
};
|
||||
use polkadot_node_primitives::SignedDisputeStatement;
|
||||
use polkadot_primitives::v2::{CandidateReceipt, ValidatorIndex};
|
||||
use polkadot_primitives::{CandidateReceipt, ValidatorIndex};
|
||||
|
||||
use crate::receiver::{BATCH_COLLECTING_INTERVAL, MIN_KEEP_BATCH_ALIVE_VOTES};
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ use std::{
|
||||
use futures::future::pending;
|
||||
|
||||
use polkadot_node_network_protocol::request_response::DISPUTE_REQUEST_TIMEOUT;
|
||||
use polkadot_primitives::v2::{CandidateHash, CandidateReceipt};
|
||||
use polkadot_primitives::{CandidateHash, CandidateReceipt};
|
||||
|
||||
use crate::{
|
||||
receiver::batches::{batch::TickResult, waiting_queue::PendingWake},
|
||||
|
||||
@@ -22,7 +22,7 @@ use fatality::Nested;
|
||||
use gum::CandidateHash;
|
||||
use polkadot_node_network_protocol::{request_response::incoming, PeerId};
|
||||
use polkadot_node_subsystem_util::runtime;
|
||||
use polkadot_primitives::v2::AuthorityDiscoveryId;
|
||||
use polkadot_primitives::AuthorityDiscoveryId;
|
||||
|
||||
use crate::LOG_TARGET;
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ use std::collections::{hash_map::Entry, HashMap, VecDeque};
|
||||
use futures::future::pending;
|
||||
use futures_timer::Delay;
|
||||
use polkadot_node_network_protocol::request_response::{v1::DisputeRequest, IncomingRequest};
|
||||
use polkadot_primitives::v2::AuthorityDiscoveryId;
|
||||
use polkadot_primitives::AuthorityDiscoveryId;
|
||||
|
||||
use crate::RECEIVE_RATE_LIMIT;
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ use polkadot_node_subsystem::{
|
||||
messages::DisputeCoordinatorMessage, overseer, ActiveLeavesUpdate, SubsystemSender,
|
||||
};
|
||||
use polkadot_node_subsystem_util::{nesting_sender::NestingSender, runtime::RuntimeInfo};
|
||||
use polkadot_primitives::v2::{CandidateHash, Hash, SessionIndex};
|
||||
use polkadot_primitives::{CandidateHash, Hash, SessionIndex};
|
||||
|
||||
/// For each ongoing dispute we have a `SendTask` which takes care of it.
|
||||
///
|
||||
|
||||
@@ -28,7 +28,7 @@ use polkadot_node_network_protocol::{
|
||||
};
|
||||
use polkadot_node_subsystem::{messages::NetworkBridgeTxMessage, overseer};
|
||||
use polkadot_node_subsystem_util::{metrics, nesting_sender::NestingSender, runtime::RuntimeInfo};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
AuthorityDiscoveryId, CandidateHash, Hash, SessionIndex, ValidatorIndex,
|
||||
};
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ use sp_keyring::Sr25519Keyring;
|
||||
use sp_keystore::{SyncCryptoStore, SyncCryptoStorePtr};
|
||||
|
||||
use polkadot_node_primitives::{DisputeMessage, SignedDisputeStatement};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
AuthorityDiscoveryId, CandidateHash, CandidateReceipt, Hash, SessionIndex, SessionInfo,
|
||||
ValidatorId, ValidatorIndex,
|
||||
};
|
||||
@@ -210,7 +210,7 @@ impl MockAuthorityDiscovery {
|
||||
impl AuthorityDiscovery for MockAuthorityDiscovery {
|
||||
async fn get_addresses_by_authority_id(
|
||||
&mut self,
|
||||
_authority: polkadot_primitives::v2::AuthorityDiscoveryId,
|
||||
_authority: polkadot_primitives::AuthorityDiscoveryId,
|
||||
) -> Option<HashSet<sc_network::Multiaddr>> {
|
||||
panic!("Not implemented");
|
||||
}
|
||||
@@ -218,7 +218,7 @@ impl AuthorityDiscovery for MockAuthorityDiscovery {
|
||||
async fn get_authority_ids_by_peer_id(
|
||||
&mut self,
|
||||
peer_id: polkadot_node_network_protocol::PeerId,
|
||||
) -> Option<HashSet<polkadot_primitives::v2::AuthorityDiscoveryId>> {
|
||||
) -> Option<HashSet<polkadot_primitives::AuthorityDiscoveryId>> {
|
||||
for (a, p) in self.peer_ids.iter() {
|
||||
if p == &peer_id {
|
||||
let result =
|
||||
|
||||
@@ -56,7 +56,7 @@ use polkadot_node_subsystem::{
|
||||
use polkadot_node_subsystem_test_helpers::{
|
||||
mock::make_ferdie_keystore, subsystem_test_harness, TestSubsystemContextHandle,
|
||||
};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
AuthorityDiscoveryId, CandidateHash, CandidateReceipt, Hash, SessionIndex, SessionInfo,
|
||||
};
|
||||
|
||||
|
||||
@@ -51,9 +51,7 @@ use polkadot_node_subsystem::{
|
||||
overseer, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, SpawnedSubsystem, SubsystemError,
|
||||
};
|
||||
use polkadot_node_subsystem_util as util;
|
||||
use polkadot_primitives::v2::{
|
||||
AuthorityDiscoveryId, Hash, SessionIndex, SessionInfo, ValidatorIndex,
|
||||
};
|
||||
use polkadot_primitives::{AuthorityDiscoveryId, Hash, SessionIndex, SessionInfo, ValidatorIndex};
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
@@ -37,7 +37,7 @@ use polkadot_node_subsystem::{
|
||||
};
|
||||
use polkadot_node_subsystem_test_helpers as test_helpers;
|
||||
use polkadot_node_subsystem_util::TimeoutExt as _;
|
||||
use polkadot_primitives::v2::{GroupIndex, IndexedVec};
|
||||
use polkadot_primitives::{GroupIndex, IndexedVec};
|
||||
use test_helpers::mock::make_ferdie_keystore;
|
||||
|
||||
use super::*;
|
||||
@@ -121,14 +121,14 @@ impl MockAuthorityDiscovery {
|
||||
impl AuthorityDiscovery for MockAuthorityDiscovery {
|
||||
async fn get_addresses_by_authority_id(
|
||||
&mut self,
|
||||
authority: polkadot_primitives::v2::AuthorityDiscoveryId,
|
||||
authority: polkadot_primitives::AuthorityDiscoveryId,
|
||||
) -> Option<HashSet<sc_network::Multiaddr>> {
|
||||
self.addrs.get(&authority).cloned()
|
||||
}
|
||||
async fn get_authority_ids_by_peer_id(
|
||||
&mut self,
|
||||
peer_id: polkadot_node_network_protocol::PeerId,
|
||||
) -> Option<HashSet<polkadot_primitives::v2::AuthorityDiscoveryId>> {
|
||||
) -> Option<HashSet<polkadot_primitives::AuthorityDiscoveryId>> {
|
||||
self.authorities.get(&peer_id).cloned()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ use async_trait::async_trait;
|
||||
|
||||
use sc_authority_discovery::Service as AuthorityDiscoveryService;
|
||||
|
||||
use polkadot_primitives::v2::AuthorityDiscoveryId;
|
||||
use polkadot_primitives::AuthorityDiscoveryId;
|
||||
use sc_network::{Multiaddr, PeerId};
|
||||
|
||||
/// An abstraction over the authority discovery service.
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
//!
|
||||
|
||||
use crate::PeerId;
|
||||
use polkadot_primitives::v2::{AuthorityDiscoveryId, SessionIndex, ValidatorIndex};
|
||||
use polkadot_primitives::{AuthorityDiscoveryId, SessionIndex, ValidatorIndex};
|
||||
use rand::{CryptoRng, Rng};
|
||||
use std::{
|
||||
collections::{hash_map, HashMap, HashSet},
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#![warn(missing_docs)]
|
||||
|
||||
use parity_scale_codec::{Decode, Encode};
|
||||
use polkadot_primitives::v2::{BlockNumber, Hash};
|
||||
use polkadot_primitives::{BlockNumber, Hash};
|
||||
use std::{collections::HashMap, fmt};
|
||||
|
||||
#[doc(hidden)]
|
||||
@@ -139,7 +139,7 @@ impl std::ops::Deref for OurView {
|
||||
///
|
||||
/// ```
|
||||
/// # use polkadot_node_network_protocol::our_view;
|
||||
/// # use polkadot_primitives::v2::Hash;
|
||||
/// # use polkadot_primitives::Hash;
|
||||
/// let our_view = our_view![Hash::repeat_byte(1), Hash::repeat_byte(2)];
|
||||
/// ```
|
||||
#[macro_export]
|
||||
@@ -173,7 +173,7 @@ pub struct View {
|
||||
///
|
||||
/// ```
|
||||
/// # use polkadot_node_network_protocol::view;
|
||||
/// # use polkadot_primitives::v2::Hash;
|
||||
/// # use polkadot_primitives::Hash;
|
||||
/// let view = view![Hash::repeat_byte(1), Hash::repeat_byte(2)];
|
||||
/// ```
|
||||
#[macro_export]
|
||||
@@ -398,7 +398,7 @@ impl_versioned_try_from!(
|
||||
pub mod v1 {
|
||||
use parity_scale_codec::{Decode, Encode};
|
||||
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
CandidateHash, CandidateIndex, CollatorId, CollatorSignature, CompactStatement, Hash,
|
||||
Id as ParaId, UncheckedSignedAvailabilityBitfield, ValidatorIndex, ValidatorSignature,
|
||||
};
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
//! All peersets and protocols used for parachains.
|
||||
|
||||
use derive_more::Display;
|
||||
use polkadot_primitives::v2::Hash;
|
||||
use polkadot_primitives::Hash;
|
||||
use sc_network_common::{
|
||||
config::{NonDefaultSetConfig, SetConfig},
|
||||
protocol::ProtocolName,
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
use std::{collections::HashMap, time::Duration, u64};
|
||||
|
||||
use futures::channel::mpsc;
|
||||
use polkadot_primitives::v2::{MAX_CODE_SIZE, MAX_POV_SIZE};
|
||||
use polkadot_primitives::{MAX_CODE_SIZE, MAX_POV_SIZE};
|
||||
use strum::{EnumIter, IntoEnumIterator};
|
||||
|
||||
pub use sc_network::{config as network, config::RequestResponseConfig, ProtocolName};
|
||||
|
||||
@@ -21,7 +21,7 @@ use parity_scale_codec::{Decode, Encode, Error as DecodingError};
|
||||
use sc_network as network;
|
||||
use sc_network::PeerId;
|
||||
|
||||
use polkadot_primitives::v2::AuthorityDiscoveryId;
|
||||
use polkadot_primitives::AuthorityDiscoveryId;
|
||||
|
||||
use super::{v1, IsRequest, Protocol};
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ use parity_scale_codec::{Decode, Encode};
|
||||
use polkadot_node_primitives::{
|
||||
AvailableData, DisputeMessage, ErasureChunk, PoV, Proof, UncheckedDisputeMessage,
|
||||
};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
CandidateHash, CandidateReceipt, CommittedCandidateReceipt, Hash, Id as ParaId, ValidatorIndex,
|
||||
};
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
use polkadot_node_network_protocol::PeerId;
|
||||
use polkadot_node_subsystem::SubsystemError;
|
||||
use polkadot_node_subsystem_util::runtime;
|
||||
use polkadot_primitives::v2::{CandidateHash, Hash};
|
||||
use polkadot_primitives::{CandidateHash, Hash};
|
||||
|
||||
use crate::LOG_TARGET;
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ use polkadot_node_subsystem::{
|
||||
overseer, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, PerLeafSpan, SpawnedSubsystem,
|
||||
SubsystemError,
|
||||
};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
AuthorityDiscoveryId, CandidateHash, CommittedCandidateReceipt, CompactStatement, Hash,
|
||||
IndexedVec, SignedStatement, SigningContext, UncheckedSignedStatement, ValidatorId,
|
||||
ValidatorIndex, ValidatorSignature,
|
||||
|
||||
@@ -30,7 +30,7 @@ use polkadot_node_network_protocol::{
|
||||
};
|
||||
use polkadot_node_subsystem::{Span, Stage};
|
||||
use polkadot_node_subsystem_util::TimeoutExt;
|
||||
use polkadot_primitives::v2::{CandidateHash, CommittedCandidateReceipt, Hash};
|
||||
use polkadot_primitives::{CandidateHash, CommittedCandidateReceipt, Hash};
|
||||
|
||||
use crate::{metrics::Metrics, COST_WRONG_HASH, LOG_TARGET};
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ use polkadot_node_network_protocol::{
|
||||
},
|
||||
PeerId, UnifiedReputationChange as Rep,
|
||||
};
|
||||
use polkadot_primitives::v2::{CandidateHash, CommittedCandidateReceipt, Hash};
|
||||
use polkadot_primitives::{CandidateHash, CommittedCandidateReceipt, Hash};
|
||||
|
||||
use crate::LOG_TARGET;
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ use polkadot_node_subsystem::{
|
||||
ActivatedLeaf, LeafStatus,
|
||||
};
|
||||
use polkadot_node_subsystem_test_helpers::mock::make_ferdie_keystore;
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
GroupIndex, Hash, Id as ParaId, IndexedVec, SessionInfo, ValidationCode, ValidatorId,
|
||||
};
|
||||
use polkadot_primitives_test_helpers::{
|
||||
|
||||
Reference in New Issue
Block a user