Skip to content

Commit 970410c

Browse files
jpraynaudiquerejeta
authored andcommitted
Fix tests certificate chain
Giving a higher probability to win lotteries to the signer fixes the problem. Just modifying the value of the party_id created the same problem in the main branch (with the same stake distribution).
1 parent 52552d1 commit 970410c

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

mithril-aggregator/tests/certificate_chain.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ async fn certificate_chain() {
1313
let protocol_parameters = ProtocolParameters {
1414
k: 5,
1515
m: 100,
16-
phi_f: 0.65,
16+
phi_f: 0.95,
1717
};
1818
let mut tester = RuntimeTester::build(protocol_parameters.clone()).await;
1919

mithril-aggregator/tests/create_certificate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ async fn create_certificate() {
1010
let protocol_parameters = ProtocolParameters {
1111
k: 5,
1212
m: 100,
13-
phi_f: 0.65,
13+
phi_f: 0.95,
1414
};
1515
let mut tester = RuntimeTester::build(protocol_parameters.clone()).await;
1616

mithril-aggregator/tests/test_extensions/runtime_tester.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,13 @@ impl RuntimeTester {
221221
e
222222
)
223223
})?;
224+
} else {
225+
panic!(
226+
"Signer '{}' could not sign. \
227+
This test is based on the assumption that every signer signs everytime. \
228+
Possible fix: relax the protocol parameters or give more stakes to this signer.",
229+
signer_with_stake.party_id
230+
);
224231
}
225232
}
226233

0 commit comments

Comments
 (0)