Skip to content

Commit

Permalink
fix: coins check
Browse files Browse the repository at this point in the history
  • Loading branch information
RafilxTenfen committed Dec 19, 2024
1 parent e666be6 commit f99d86e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions test/e2e/btc_rewards_distribution_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,14 +329,15 @@ func (s *BtcRewardsDistribution) Test5CheckRewardsFirstDelegations() {
// The rewards distributed to the delegators should be the same for each delegator
// del1 ~7130ubbn
// del2 ~7130ubbn
s.Equal(btcDel1LastRewardGauge.Coins.String(), btcDel2LastRewardGauge.Coins.String())
// note that the rewards will not be precise as more or less blocks were produced and given out rewards.
coins.RequireCoinsDiffInPointOnePercentMargin(s.T(), btcDel1LastRewardGauge.Coins, btcDel2LastRewardGauge.Coins)

// note that the rewards will not be precise as more or less blocks were produced and given out rewards.
// Withdraw the reward just for del2 to check it is possible
del2BalanceBeforeWithdraw, err := n2.QueryBalances(s.del2Addr)
s.NoError(err)

n2.WaitForNextBlockWithSleep50ms()
del2BalanceBeforeWithdraw, errQueryB := n2.QueryBalances(s.del2Addr)
n2.WithdrawReward(itypes.BTCDelegationType.String(), wDel2)

s.NoError(errQueryB)
n2.WaitForNextBlock()

del2BalanceAfterWithdraw, err := n2.QueryBalances(s.del2Addr)
Expand Down

0 comments on commit f99d86e

Please sign in to comment.