mirror of https://github.com/poanetwork/hbbft.git
Upgrade to Rust 1.30.0.
This commit is contained in:
parent
4560070fec
commit
e1038c66ba
|
@ -1,6 +1,6 @@
|
||||||
language: rust
|
language: rust
|
||||||
rust:
|
rust:
|
||||||
- 1.29.0
|
- 1.30.0
|
||||||
cache:
|
cache:
|
||||||
cargo: true
|
cargo: true
|
||||||
timeout: 1200
|
timeout: 1200
|
||||||
|
|
4
ci.sh
4
ci.sh
|
@ -9,8 +9,8 @@ export RUSTFLAGS="-D warnings -C target-cpu=native"
|
||||||
# Currently, mlocking secrets is disabled due to secure memory limit issues.
|
# Currently, mlocking secrets is disabled due to secure memory limit issues.
|
||||||
export MLOCK_SECRETS=false
|
export MLOCK_SECRETS=false
|
||||||
|
|
||||||
cargo clippy --all-targets -- --deny clippy
|
cargo clippy --all-targets -- --deny clippy::all
|
||||||
cargo clippy --all-features --all-targets -- --deny clippy
|
cargo clippy --all-features --all-targets -- --deny clippy::all
|
||||||
cargo fmt -- --check
|
cargo fmt -- --check
|
||||||
|
|
||||||
# We only test with mocktography, to ensure tests aren't unreasonably long.
|
# We only test with mocktography, to ensure tests aren't unreasonably long.
|
||||||
|
|
|
@ -149,7 +149,7 @@ fn do_drop_and_readd(cfg: TestConfig) {
|
||||||
net.correct_nodes().map(|n| *n.id()).collect();
|
net.correct_nodes().map(|n| *n.id()).collect();
|
||||||
let mut expected_outputs: collections::BTreeMap<_, collections::BTreeSet<_>> = net
|
let mut expected_outputs: collections::BTreeMap<_, collections::BTreeSet<_>> = net
|
||||||
.correct_nodes()
|
.correct_nodes()
|
||||||
.map(|n| (*n.id(), (0..10).into_iter().collect()))
|
.map(|n| (*n.id(), (0..10).collect()))
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
// Run the network:
|
// Run the network:
|
||||||
|
|
|
@ -181,6 +181,7 @@ fn network_to_u32_is_correct() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
#[cfg_attr(feature = "cargo-clippy", allow(cyclomatic_complexity))]
|
||||||
fn network_from_u32_is_correct() {
|
fn network_from_u32_is_correct() {
|
||||||
assert_eq!(NetworkDimension::new(1, 0), NetworkDimension::from(0u32));
|
assert_eq!(NetworkDimension::new(1, 0), NetworkDimension::from(0u32));
|
||||||
assert_eq!(NetworkDimension::new(2, 0), NetworkDimension::from(1u32));
|
assert_eq!(NetworkDimension::new(2, 0), NetworkDimension::from(1u32));
|
||||||
|
|
|
@ -110,11 +110,8 @@ fn test_subset_5_nodes_different_proposed_values() {
|
||||||
Vec::from("Delta"),
|
Vec::from("Delta"),
|
||||||
Vec::from("Echo"),
|
Vec::from("Echo"),
|
||||||
];
|
];
|
||||||
let proposals: BTreeMap<NodeId, ProposedValue> = (0..5)
|
let proposals: BTreeMap<NodeId, ProposedValue> =
|
||||||
.into_iter()
|
(0..5).map(NodeId).zip(proposed_values).collect();
|
||||||
.map(NodeId)
|
|
||||||
.zip(proposed_values)
|
|
||||||
.collect();
|
|
||||||
let adversary = |_| SilentAdversary::new(MessageScheduler::Random);
|
let adversary = |_| SilentAdversary::new(MessageScheduler::Random);
|
||||||
let network = new_network(5, 0, adversary);
|
let network = new_network(5, 0, adversary);
|
||||||
test_subset(network, &proposals);
|
test_subset(network, &proposals);
|
||||||
|
|
Loading…
Reference in New Issue