Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
sc-client-babe/sp-arithmetic-fuzzer: update num-bigint and num-ration…
…al to v0.4
  • Loading branch information
koushiro committed Oct 25, 2022
commit a601bfb3a228a30f3649d44bab1baaf5b883653e
40 changes: 8 additions & 32 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 3 additions & 6 deletions client/consensus/babe/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,14 @@ targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
async-trait = "0.1.57"
codec = { package = "parity-scale-codec", version = "3.0.0", features = [
"derive",
] }
codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"] }
futures = "0.3.21"
log = "0.4.17"
merlin = "2.0"
num-bigint = "0.2.3"
num-rational = "0.2.2"
num-bigint = "0.4.3"
num-rational = "0.4.1"
num-traits = "0.2.8"
parking_lot = "0.12.1"
rand = "0.7.2"
schnorrkel = { version = "0.9.1", features = ["preaudit_deprecated"] }
serde = { version = "1.0.136", features = ["derive"] }
thiserror = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion client/consensus/babe/src/authorship.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ pub(super) fn calculate_primary_threshold(
qed.",
);

((BigUint::one() << 128) * numer / denom).to_u128().expect(
((BigUint::one() << 128usize) * numer / denom).to_u128().expect(
"returns None if the underlying value cannot be represented with 128 bits; \
we start with 2^128 which is one more than can be represented with 128 bits; \
we multiple by p which is defined in [0, 1); \
Expand Down
3 changes: 1 addition & 2 deletions client/consensus/babe/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ use super::*;
use authorship::claim_slot;
use futures::executor::block_on;
use log::debug;
use rand::RngCore;
use rand_chacha::{rand_core::SeedableRng, ChaChaRng};
use rand_chacha::{rand_core::{RngCore, SeedableRng}, ChaChaRng};
use sc_block_builder::{BlockBuilder, BlockBuilderProvider};
use sc_client_api::{backend::TransactionFor, BlockchainEvents, Finalizer};
use sc_consensus::{BoxBlockImport, BoxJustificationImport};
Expand Down
2 changes: 1 addition & 1 deletion primitives/arithmetic/fuzzer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
honggfuzz = "0.5.49"
num-bigint = "0.2"
num-bigint = "0.4.3"
primitive-types = "0.12.0"
sp-arithmetic = { version = "5.0.0", path = ".." }

Expand Down