diff --git a/mobile_verifier/src/reward_shares.rs b/mobile_verifier/src/reward_shares.rs index edd8709c1..98c3ce4da 100644 --- a/mobile_verifier/src/reward_shares.rs +++ b/mobile_verifier/src/reward_shares.rs @@ -1000,8 +1000,8 @@ mod test { ); // These are the same because we gave `total_reward_points: 30,` for each // VerifiedMappingEventShares which is the same amount as discovery mapping - assert_eq!(819_672_131, r.discovery_location_amount); - assert_eq!(819_672_131, r.verification_mapping_amount); + assert_eq!(821_917_808, r.discovery_location_amount); + assert_eq!(821_917_808, r.verification_mapping_amount); allocated_mapper_rewards += reward_amount; } } diff --git a/mobile_verifier/tests/integrations/rewarder_mappers.rs b/mobile_verifier/tests/integrations/rewarder_mappers.rs index e438dbc52..fe98830fb 100644 --- a/mobile_verifier/tests/integrations/rewarder_mappers.rs +++ b/mobile_verifier/tests/integrations/rewarder_mappers.rs @@ -32,6 +32,7 @@ async fn test_mapper_rewards(pool: PgPool) -> anyhow::Result<()> { rewarder::reward_mappers(&pool, &mobile_rewards_client, &epoch), receive_expected_rewards(&mut mobile_rewards) ); + if let Ok((subscriber_rewards, unallocated_reward)) = rewards { // assert the mapper rewards // all 3 subscribers will have an equal share, @@ -101,7 +102,9 @@ async fn receive_expected_rewards( let subscriber_reward1 = mobile_rewards.receive_subscriber_reward().await; let subscriber_reward2 = mobile_rewards.receive_subscriber_reward().await; let subscriber_reward3 = mobile_rewards.receive_subscriber_reward().await; - let subscriber_rewards = vec![subscriber_reward1, subscriber_reward2, subscriber_reward3]; + let mut subscriber_rewards = vec![subscriber_reward1, subscriber_reward2, subscriber_reward3]; + + subscriber_rewards.sort_by(|a, b| a.subscriber_id.cmp(&b.subscriber_id)); // expect one unallocated reward let unallocated_reward = mobile_rewards.receive_unallocated_reward().await;