Update dependencies ahead of next release (#8015)

Updates dependencies:
parity-db 0.2.2
paste
prometheus 0.11
cfg-if 1.0
strum 0.20
env_logger 0.8
pin-project
prost
nix
platforms
quickcheck 1.0
This commit is contained in:
Benjamin Kampmann
2021-02-04 19:17:42 +01:00
committed by GitHub
parent e5ef38330d
commit 8e36d87ca8
25 changed files with 670 additions and 617 deletions
@@ -345,8 +345,7 @@ impl<'a, B: BlockT> Matcher<'a, B> {
mod tests {
use crate::protocol::sync::PeerSync;
use sp_blockchain::Error as ClientError;
use quickcheck::{Arbitrary, Gen, QuickCheck, StdThreadGen};
use rand::Rng;
use quickcheck::{Arbitrary, Gen, QuickCheck};
use std::collections::{HashMap, HashSet};
use super::*;
use sp_test_primitives::{Block, BlockNumber, Hash};
@@ -373,7 +372,7 @@ mod tests {
}
}
QuickCheck::with_gen(StdThreadGen::new(19))
QuickCheck::new()
.quickcheck(property as fn(ArbitraryPeers))
}
@@ -425,7 +424,7 @@ mod tests {
previously_active == requests.pending_requests.iter().cloned().collect::<HashSet<_>>()
}
QuickCheck::with_gen(StdThreadGen::new(19))
QuickCheck::new()
.quickcheck(property as fn(ArbitraryPeers) -> bool)
}
@@ -457,7 +456,7 @@ mod tests {
}
}
QuickCheck::with_gen(StdThreadGen::new(19))
QuickCheck::new()
.quickcheck(property as fn(ArbitraryPeers))
}
@@ -527,11 +526,11 @@ mod tests {
struct ArbitraryPeerSyncState(PeerSyncState<Block>);
impl Arbitrary for ArbitraryPeerSyncState {
fn arbitrary<G: Gen>(g: &mut G) -> Self {
let s = match g.gen::<u8>() % 4 {
fn arbitrary(g: &mut Gen) -> Self {
let s = match u8::arbitrary(g) % 4 {
0 => PeerSyncState::Available,
// TODO: 1 => PeerSyncState::AncestorSearch(g.gen(), AncestorSearchState<B>),
1 => PeerSyncState::DownloadingNew(g.gen::<BlockNumber>()),
1 => PeerSyncState::DownloadingNew(BlockNumber::arbitrary(g)),
2 => PeerSyncState::DownloadingStale(Hash::random()),
_ => PeerSyncState::DownloadingJustification(Hash::random()),
};
@@ -543,12 +542,12 @@ mod tests {
struct ArbitraryPeerSync(PeerSync<Block>);
impl Arbitrary for ArbitraryPeerSync {
fn arbitrary<G: Gen>(g: &mut G) -> Self {
fn arbitrary(g: &mut Gen) -> Self {
let ps = PeerSync {
peer_id: PeerId::random(),
common_number: g.gen(),
common_number: u64::arbitrary(g),
best_hash: Hash::random(),
best_number: g.gen(),
best_number: u64::arbitrary(g),
state: ArbitraryPeerSyncState::arbitrary(g).0,
};
ArbitraryPeerSync(ps)
@@ -559,7 +558,7 @@ mod tests {
struct ArbitraryPeers(HashMap<PeerId, PeerSync<Block>>);
impl Arbitrary for ArbitraryPeers {
fn arbitrary<G: Gen>(g: &mut G) -> Self {
fn arbitrary(g: &mut Gen) -> Self {
let mut peers = HashMap::with_capacity(g.size());
for _ in 0 .. g.size() {
let ps = ArbitraryPeerSync::arbitrary(g).0;