mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-24 10:05:48 +00:00
Comanion for substrate#11136 (#5218)
* Comanion for substrate#11136 Signed-off-by: koushiro <koushiro.cqx@gmail.com> * revert changes in bridge Signed-off-by: koushiro <koushiro.cqx@gmail.com>
This commit is contained in:
@@ -54,7 +54,7 @@ use sp_consensus_slots::Slot;
|
||||
use bitvec::order::Lsb0 as BitOrderLsb0;
|
||||
use futures::{channel::oneshot, prelude::*};
|
||||
|
||||
use std::{collections::HashMap, convert::TryFrom};
|
||||
use std::collections::HashMap;
|
||||
|
||||
use super::approval_db::v1;
|
||||
use crate::{
|
||||
|
||||
@@ -22,10 +22,7 @@ use polkadot_node_subsystem::SubsystemResult;
|
||||
use bitvec::order::Lsb0 as BitOrderLsb0;
|
||||
use polkadot_primitives::v2::{BlockNumber, CandidateHash, CandidateReceipt, GroupIndex, Hash};
|
||||
|
||||
use std::{
|
||||
collections::{hash_map::Entry, BTreeMap, HashMap},
|
||||
convert::Into,
|
||||
};
|
||||
use std::collections::{hash_map::Entry, BTreeMap, HashMap};
|
||||
|
||||
use super::{
|
||||
approval_db::v1::{OurAssignment, StoredBlockRange},
|
||||
|
||||
@@ -35,7 +35,6 @@ pub struct Metrics(Option<MetricsInner>);
|
||||
impl Metrics {
|
||||
pub(crate) fn on_chunks_received(&self, count: usize) {
|
||||
if let Some(metrics) = &self.0 {
|
||||
use core::convert::TryFrom as _;
|
||||
// assume usize fits into u64
|
||||
let by = u64::try_from(count).unwrap_or_default();
|
||||
metrics.received_availability_chunks_total.inc_by(by);
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
|
||||
use super::*;
|
||||
|
||||
use std::convert::TryFrom;
|
||||
|
||||
use assert_matches::assert_matches;
|
||||
use futures::{channel::oneshot, executor, future, Future};
|
||||
|
||||
|
||||
@@ -1456,7 +1456,6 @@ fn validation_work_ignores_wrong_collator() {
|
||||
#[test]
|
||||
fn candidate_backing_reorders_votes() {
|
||||
use sp_core::Encode;
|
||||
use std::convert::TryFrom;
|
||||
|
||||
let para_id = ParaId::from(10);
|
||||
let validators = vec![
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use polkadot_node_subsystem_util::metrics::{self, prometheus};
|
||||
use std::convert::TryInto;
|
||||
|
||||
#[derive(Clone)]
|
||||
struct MetricsInner {
|
||||
|
||||
@@ -21,7 +21,7 @@ use polkadot_test_service::{node_config, run_validator_node, test_prometheus_con
|
||||
use primitives::v2::metric_definitions::PARACHAIN_INHERENT_DATA_BITFIELDS_PROCESSED;
|
||||
use sc_client_api::{execution_extensions::ExecutionStrategies, ExecutionStrategy};
|
||||
use sp_keyring::AccountKeyring::*;
|
||||
use std::{collections::HashMap, convert::TryFrom};
|
||||
use std::collections::HashMap;
|
||||
|
||||
const DEFAULT_PROMETHEUS_PORT: u16 = 9616;
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use std::{collections::HashMap, convert::TryFrom};
|
||||
use std::collections::HashMap;
|
||||
|
||||
use parity_scale_codec::Encode;
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
//! Helper functions and tools to generate mock data useful for testing this subsystem.
|
||||
|
||||
use std::{convert::TryFrom, sync::Arc};
|
||||
use std::sync::Arc;
|
||||
|
||||
use sp_keyring::Sr25519Keyring;
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
use std::{
|
||||
collections::{HashMap, VecDeque},
|
||||
convert::TryFrom,
|
||||
pin::Pin,
|
||||
time::Duration,
|
||||
};
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use std::{convert::TryFrom, sync::Arc, time::Duration};
|
||||
use std::{sync::Arc, time::Duration};
|
||||
|
||||
use assert_matches::assert_matches;
|
||||
use futures::{executor, future};
|
||||
|
||||
@@ -282,7 +282,6 @@ impl View {
|
||||
/// v1 protocol types.
|
||||
pub mod v1 {
|
||||
use parity_scale_codec::{Decode, Encode};
|
||||
use std::convert::TryFrom;
|
||||
|
||||
use polkadot_primitives::v2::{
|
||||
CandidateHash, CandidateIndex, CollatorId, CollatorSignature, CompactStatement, Hash,
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use std::convert::TryInto;
|
||||
|
||||
use parity_scale_codec::{Decode, Encode};
|
||||
|
||||
use sp_application_crypto::AppKey;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#![deny(missing_docs)]
|
||||
|
||||
use std::{convert::TryFrom, pin::Pin, time::Duration};
|
||||
use std::{pin::Pin, time::Duration};
|
||||
|
||||
use bounded_vec::BoundedVec;
|
||||
use futures::Future;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use std::{collections::HashSet, convert::TryFrom};
|
||||
use std::collections::HashSet;
|
||||
|
||||
pub use sc_network::{PeerId, ReputationChange};
|
||||
|
||||
|
||||
@@ -61,7 +61,6 @@ use sp_core::{traits::SpawnNamed, ByteArray};
|
||||
use sp_keystore::{CryptoStore, Error as KeystoreError, SyncCryptoStorePtr};
|
||||
use std::{
|
||||
collections::{hash_map::Entry, HashMap},
|
||||
convert::TryFrom,
|
||||
fmt,
|
||||
marker::Unpin,
|
||||
pin::Pin,
|
||||
|
||||
Reference in New Issue
Block a user