Skip to content

Commit

Permalink
fix: WIP in integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nseguias committed Jul 12, 2024
1 parent 7e14219 commit e2c0f8f
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions integration-tests/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,10 @@ proptest! {
let bonded_amounts = bonded_amounts.borrow();
println!(">>> [{current_epoch}] BONDED AMOUNTS {:?}", bonded_amounts);

for user in bonded_amounts.keys() {
claimable_rewards.borrow_mut().insert((user.clone(), current_epoch), true);
for (user, token_amounts) in bonded_amounts.iter() {
if token_amounts.values().any(|&amount| amount > 0) {
claimable_rewards.borrow_mut().insert((user.clone(), current_epoch), true);
}
}
} else {
suite.swap(
Expand Down Expand Up @@ -449,14 +451,14 @@ proptest! {
}
}

// suite.query_bonding_rewards(user.to_string(), |response| {
// let contract_rewards = &response.as_ref().unwrap().1.rewards;
// let has_contract_rewards = !contract_rewards.is_empty();
// println!(">>>");
// println!(">>> [{current_epoch}] CLAIMABLE REWARDS CONTRACT {:?}", contract_rewards);
// println!(">>> [{current_epoch}] CLAIMABLE REWARDS PROPTEST {:?}", claimable_rewards.borrow());
// assert_eq!(has_pending_rewards, has_contract_rewards);
// });
suite.query_bonding_rewards(user.to_string(), |response| {
let contract_rewards = &response.as_ref().unwrap().1.rewards;
let has_contract_rewards = !contract_rewards.is_empty();
println!(">>>");
println!(">>> [{current_epoch}] CLAIMABLE REWARDS CONTRACT {:?}", contract_rewards);
println!(">>> [{current_epoch}] CLAIMABLE REWARDS PROPTEST {:?}", claimable_rewards.borrow());
// assert_eq!(has_pending_rewards, has_contract_rewards);
});

if has_pending_rewards {
println!(">>> [{current_epoch}] [{user}] CLAIM");
Expand Down

0 comments on commit e2c0f8f

Please sign in to comment.