Skip to content

Commit deb2b95

Browse files
use fake data stake distribution instead of random one
Otherwise signers won't be considered valid. Co-authored-by: Jean-Philippe Raynaud <[email protected]>
1 parent 9f5f1a7 commit deb2b95

File tree

1 file changed

+4
-30
lines changed

1 file changed

+4
-30
lines changed

mithril-aggregator/src/beacon_provider.rs

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -76,36 +76,10 @@ mod tests {
7676
async fn get_current_stake_distribution(
7777
&self,
7878
) -> Result<Option<StakeDistribution>, ChainObserverError> {
79-
let stake_distribution: StakeDistribution = [
80-
(
81-
"pool1qqyjr9pcrv97gwrueunug829fs5znw6p2wxft3fvqkgu5f4qlrg".to_string(),
82-
2_493_000 as u64,
83-
),
84-
(
85-
"pool1qqfnw2fwajdnam7xsqhhrje5cgd8jcltzfrx655rd23eqlxjfef".to_string(),
86-
21_640,
87-
),
88-
(
89-
"pool1qqnjh80kudcjphrxftj74x22q3a4uvw8wknlxptgs7gdqtstqad".to_string(),
90-
80,
91-
),
92-
(
93-
"pool1qquwwu6680fr72y4779r2kpc7mxtch8rp2uhuqcc7v9p6q4f7ph".to_string(),
94-
70,
95-
),
96-
(
97-
"pool1qptl80vq84xm28pt3t2lhpfzqag28csjhktxz5k6a74n260clmt".to_string(),
98-
56,
99-
),
100-
(
101-
"pool1qpuckgzxwgdru9vvq3ydmuqa077ur783yn2uywz7zq2c29p506e".to_string(),
102-
51_610,
103-
),
104-
(
105-
"pool1qz2vzszautc2c8mljnqre2857dpmheq7kgt6vav0s38tvvhxm6w".to_string(),
106-
1_051,
107-
),
108-
]
79+
let stake_distribution: StakeDistribution = fake_data::signers_with_stakes(5).
80+
iter().
81+
map(|signer| (signer.party_id.clone() as PartyId, signer.stake as Stake))
82+
.collect::<StakeDistribution>();
10983
.into_iter()
11084
.collect();
11185

0 commit comments

Comments
 (0)