Skip to content

Commit 24bc769

Browse files
committed
Reduce number of signers used in tests
1 parent f1441bc commit 24bc769

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

mithril-aggregator/src/http_server/routes/status.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,8 @@ mod tests {
237237

238238
#[tokio::test]
239239
async fn retrieves_correct_total_signers_from_epoch_service() {
240-
let total_signers = 12;
241-
let total_next_signers = 345;
240+
let total_signers = 5;
241+
let total_next_signers = 4;
242242
let epoch_service = FakeEpochServiceBuilder {
243243
current_signers_with_stake: fake_data::signers_with_stakes(total_signers),
244244
next_signers_with_stake: fake_data::signers_with_stakes(total_next_signers),

mithril-aggregator/src/services/epoch_service.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,7 +1057,7 @@ mod tests {
10571057
allowed_discriminants: SignedEntityConfig::dummy().allowed_discriminants,
10581058
cardano_era: "CardanoEra".to_string(),
10591059
mithril_era: SupportedEra::eras()[1],
1060-
total_spo: 40,
1060+
total_spo: 10,
10611061
total_stake: 20_000_000,
10621062
..EpochServiceBuilder::new(epoch, current_epoch_fixture.clone())
10631063
};
@@ -1095,7 +1095,7 @@ mod tests {
10951095
current_signers: current_epoch_fixture.signers().into_iter().collect(),
10961096
next_signers: next_epoch_fixture.signers().into_iter().collect(),
10971097
signed_entity_config: SignedEntityConfig::dummy(),
1098-
total_spo: 40,
1098+
total_spo: 10,
10991099
total_stake: 20_000_000,
11001100
}
11011101
);

mithril-common/src/entities/mithril_stake_distribution.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ mod tests {
7070

7171
use super::*;
7272

73-
const EXPECTED_HASH: &str = "47675a6fad57040b194655b103bc0439ff9d6920a7ba86bd53756db7ce2952f5";
73+
const EXPECTED_HASH: &str = "c5c1ff02e37c751329e3db7625c77fa2a24e86b2a75422c54f1b9f9232374d6f";
7474

7575
#[test]
7676
fn test_compute_hash() {
77-
let fixtures = MithrilFixtureBuilder::default().with_signers(100).build();
77+
let fixtures = MithrilFixtureBuilder::default().with_signers(10).build();
7878
let stake_distribution = MithrilStakeDistribution::new(
7979
Epoch(1),
8080
fixtures.signers_with_stake(),
@@ -86,7 +86,7 @@ mod tests {
8686

8787
#[test]
8888
fn test_hash_fail_for_different_stake() {
89-
let fixtures = MithrilFixtureBuilder::default().with_signers(100).build();
89+
let fixtures = MithrilFixtureBuilder::default().with_signers(10).build();
9090
let mut signers = fixtures.signers_with_stake();
9191
signers[0].stake += 1;
9292
let stake_distribution =
@@ -97,7 +97,7 @@ mod tests {
9797

9898
#[test]
9999
fn test_hash_fail_for_different_epoch() {
100-
let fixtures = MithrilFixtureBuilder::default().with_signers(100).build();
100+
let fixtures = MithrilFixtureBuilder::default().with_signers(10).build();
101101
let stake_distribution = MithrilStakeDistribution::new(
102102
Epoch(2),
103103
fixtures.signers_with_stake(),
@@ -110,7 +110,7 @@ mod tests {
110110
#[test]
111111
fn test_independence_protocol_parameters() {
112112
let signers = MithrilFixtureBuilder::default()
113-
.with_signers(100)
113+
.with_signers(10)
114114
.build()
115115
.signers_with_stake();
116116
let protocol_parameters = ProtocolParameters {

0 commit comments

Comments
 (0)