mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-20 10:25:41 +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 {
|
||||
|
||||
Reference in New Issue
Block a user