Skip to content

Commit

Permalink
Better test fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
khssnv committed Oct 25, 2024
1 parent 9acffd8 commit 390556d
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions pallets/ddc-verification/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2959,12 +2959,17 @@ fn aggregator_client_challenge_bucket_sub_aggregate_works() {
let merkle_tree_node_id = "2,6";
let node_id = "0x0ac7cb9c53594e9f538d9950c6bcf28f0c0c7b8385deea2ebe24062bc640e7be";

let expected_response = proto::ChallengeResponse{
let expected_response = proto::ChallengeResponse {
proofs: vec![
proto::challenge_response::Proof{
merkle_tree_node_id: 3,
proto::challenge_response::Proof {
merkle_tree_node_id: 2,
usage: Some(proto::Aggregate{stored: 4, delivered: 3, puts: 2, gets: 1}),
..Default::default()
}
}, proto::challenge_response::Proof {
merkle_tree_node_id: 6,
usage: Some(proto::Aggregate{stored: 8, delivered: 7, puts: 6, gets: 5}),
..Default::default()
},
],
};
let mut expected_response_serialized = Vec::new();
Expand Down Expand Up @@ -3005,12 +3010,17 @@ fn aggregator_client_challenge_node_aggregate_works() {
let merkle_tree_node_id = "2,6";
let node_id = "0x0ac7cb9c53594e9f538d9950c6bcf28f0c0c7b8385deea2ebe24062bc640e7be";

let expected_response = proto::ChallengeResponse{
let expected_response = proto::ChallengeResponse {
proofs: vec![
proto::challenge_response::Proof{
merkle_tree_node_id: 3,
proto::challenge_response::Proof {
merkle_tree_node_id: 2,
usage: Some(proto::Aggregate{stored: 4, delivered: 3, puts: 2, gets: 1}),
..Default::default()
}, proto::challenge_response::Proof {
merkle_tree_node_id: 6,
usage: Some(proto::Aggregate{stored: 8, delivered: 7, puts: 6, gets: 5}),
..Default::default()
}
},
],
};
let mut expected_response_serialized = Vec::new();
Expand Down

0 comments on commit 390556d

Please sign in to comment.