Skip to content

Commit c6ef668

Browse files
[DK::CZM] Fix lint on correctness test
Co-authored-by: Maxim <59533214+biryukovmaxim@users.noreply.github.com>
1 parent 9c00f54 commit c6ef668

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎consensus/src/processes/dagknight/manager.rs‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -968,6 +968,9 @@ mod tests {
968968
);
969969
}
970970

971+
/// (id, parents, blue_work, bits, blue_score, daa_score, selected_parent)
972+
type JsonTestBlock<SP = Hash> = (Hash, Vec<Hash>, Uint192, u32, u64, u64, SP);
973+
971974
#[test]
972975
fn test_czm_lkt_correctness() {
973976
let mut reachability = MemoryReachabilityStore::new();
@@ -1001,7 +1004,7 @@ mod tests {
10011004

10021005
let blocks = json_data["blocks"].as_array().expect("Blocks is not an array");
10031006

1004-
let test_blocks: Vec<(Hash, Vec<Hash>, Uint192, u32, u64, u64, Hash)> = blocks
1007+
let test_blocks: Vec<JsonTestBlock> = blocks
10051008
.iter()
10061009
.map(|block| {
10071010
let id = Hash::from_str(block["id"].as_str().unwrap()).unwrap();
@@ -1074,7 +1077,7 @@ mod tests {
10741077
let conflict_genesis = Hash::from_str(json_data["conflict_genesis"].as_str().unwrap()).unwrap();
10751078

10761079
// (id, parents, blue_work, bits, blue_score, daa_score, selected_parent)
1077-
let mut test_blocks: Vec<(Hash, Vec<Hash>, Uint192, u32, u64, u64, Option<Hash>)> = json_data["blocks"]
1080+
let mut test_blocks: Vec<JsonTestBlock<Option<Hash>>> = json_data["blocks"]
10781081
.as_array()
10791082
.unwrap()
10801083
.iter()

0 commit comments

Comments
 (0)