Skip to content

Commit db295f0

Browse files
committed
Remove duplicate test and downgrade night version in CI because of rust-lang/rust#105044
1 parent 73316e5 commit db295f0

File tree

3 files changed

+8
-59
lines changed

3 files changed

+8
-59
lines changed

.github/workflows/cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- uses: actions-rs/toolchain@v1
4848
with:
4949
profile: minimal
50-
toolchain: nightly
50+
toolchain: nightly-2022-11-14
5151
target: ${{ matrix.target }}
5252
override: true
5353
- uses: Swatinem/rust-cache@v1

.github/workflows/ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- uses: actions-rs/toolchain@v1
2828
with:
2929
profile: minimal
30-
toolchain: nightly
30+
toolchain: nightly-2022-11-14
3131
components: rustfmt
3232
override: true
3333
- uses: Swatinem/rust-cache@v1
@@ -47,7 +47,7 @@ jobs:
4747
- uses: actions-rs/toolchain@v1
4848
with:
4949
profile: minimal
50-
toolchain: nightly
50+
toolchain: nightly-2022-11-14
5151
override: true
5252
- uses: Swatinem/rust-cache@v1
5353
- uses: actions-rs/cargo@v1
@@ -65,7 +65,7 @@ jobs:
6565
- uses: actions-rs/toolchain@v1
6666
with:
6767
profile: minimal
68-
toolchain: nightly
68+
toolchain: nightly-2022-11-14
6969
override: true
7070
- uses: Swatinem/rust-cache@v1
7171
- uses: actions-rs/cargo@v1
@@ -84,7 +84,7 @@ jobs:
8484
- uses: actions-rs/toolchain@v1
8585
with:
8686
profile: minimal
87-
toolchain: nightly
87+
toolchain: nightly-2022-11-14
8888
override: true
8989
- uses: Swatinem/rust-cache@v1
9090
- uses: actions-rs/cargo@v1
@@ -104,7 +104,7 @@ jobs:
104104
- uses: actions-rs/toolchain@v1
105105
with:
106106
profile: minimal
107-
toolchain: nightly
107+
toolchain: nightly-2022-11-14
108108
components: clippy
109109
override: true
110110
- uses: Swatinem/rust-cache@v1
@@ -133,7 +133,7 @@ jobs:
133133
- uses: actions-rs/toolchain@v1
134134
with:
135135
profile: minimal
136-
toolchain: nightly
136+
toolchain: nightly-2022-11-14
137137
override: true
138138
- uses: Swatinem/rust-cache@v1
139139
- uses: actions-rs/cargo@v1
@@ -162,7 +162,7 @@ jobs:
162162
- uses: actions-rs/toolchain@v1
163163
with:
164164
profile: minimal
165-
toolchain: nightly
165+
toolchain: nightly-2022-11-14
166166
components: rustfmt
167167
override: true
168168
- uses: actions-rs/cargo@v1

massa-pos-exports/src/cycle_info.rs

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -107,57 +107,6 @@ pub struct CycleInfo {
107107
pub global_hash: Hash,
108108
}
109109

110-
#[test]
111-
fn test_cycle_info_hash_computation() {
112-
use crate::DeferredCredits;
113-
use bitvec::prelude::*;
114-
115-
let mut cycle_a = CycleInfo::new_with_hash(
116-
0,
117-
false,
118-
BTreeMap::default(),
119-
BitVec::default(),
120-
PreHashMap::default(),
121-
);
122-
let addr = Address::from_bytes(&[0u8; 32]);
123-
let mut roll_changes = PreHashMap::default();
124-
roll_changes.insert(addr, 42);
125-
let mut production_stats = PreHashMap::default();
126-
production_stats.insert(
127-
addr,
128-
ProductionStats {
129-
block_success_count: 4,
130-
block_failure_count: 0,
131-
},
132-
);
133-
let changes = PoSChanges {
134-
seed_bits: bitvec![u8, Lsb0; 0, 42],
135-
roll_changes,
136-
production_stats,
137-
deferred_credits: DeferredCredits::default(),
138-
};
139-
cycle_a.apply_changes(changes, Slot::new(0, 0), 2, 2);
140-
let cycle_b = CycleInfo::new_with_hash(
141-
0,
142-
cycle_a.complete,
143-
cycle_a.roll_counts,
144-
cycle_a.rng_seed,
145-
cycle_a.production_stats,
146-
);
147-
assert_eq!(
148-
cycle_a.roll_counts_hash, cycle_b.roll_counts_hash,
149-
"roll_counts_hash mismatch"
150-
);
151-
assert_eq!(
152-
cycle_a.production_stats_hash, cycle_b.production_stats_hash,
153-
"production_stats_hash mismatch"
154-
);
155-
assert_eq!(
156-
cycle_a.global_hash, cycle_b.global_hash,
157-
"global_hash mismatch"
158-
);
159-
}
160-
161110
impl CycleInfo {
162111
/// Create a new `CycleInfo` and compute its hash
163112
pub fn new_with_hash(

0 commit comments

Comments
 (0)