diff --git a/test/e2e-go/features/participation/participationRewards_test.go b/test/e2e-go/features/participation/participationRewards_test.go index a7dd6452e4..3c8a293714 100644 --- a/test/e2e-go/features/participation/participationRewards_test.go +++ b/test/e2e-go/features/participation/participationRewards_test.go @@ -347,8 +347,7 @@ func TestRewardRateRecalculation(t *testing.T) { r.NoError(err) minFee, minBal, err := fixture.MinFeeAndBalance(curStatus.LastRound) r.NoError(err) - deadline := curStatus.LastRound + uint64(5) - fixture.SendMoneyAndWait(deadline, amountToSend, minFee, richAccount.Address, rewardsAccount, "") + fixture.SendMoneyAndWait(curStatus.LastRound, amountToSend, minFee, richAccount.Address, rewardsAccount, "") blk, err := client.Block(curStatus.LastRound) r.NoError(err) @@ -373,8 +372,7 @@ func TestRewardRateRecalculation(t *testing.T) { curStatus, err = client.Status() r.NoError(err) - deadline = curStatus.LastRound + uint64(5) - fixture.SendMoneyAndWait(deadline, amountToSend, minFee, richAccount.Address, rewardsAccount, "") + fixture.SendMoneyAndWait(curStatus.LastRound, amountToSend, minFee, richAccount.Address, rewardsAccount, "") rewardRecalcRound = rewardRecalcRound + consensusParams.RewardsRateRefreshInterval diff --git a/test/framework/fixtures/restClientFixture.go b/test/framework/fixtures/restClientFixture.go index f77e786c87..c9f3befa84 100644 --- a/test/framework/fixtures/restClientFixture.go +++ b/test/framework/fixtures/restClientFixture.go @@ -18,6 +18,7 @@ package fixtures import ( "fmt" + "github.com/algorand/go-algorand/data/basics" "sort" "time" "unicode" @@ -328,7 +329,8 @@ func (f *RestClientFixture) SendMoneyAndWait(curRound, amountToSend, transaction // SendMoneyAndWaitFromWallet is as above, but for a specific wallet func (f *RestClientFixture) SendMoneyAndWaitFromWallet(walletHandle, walletPassword []byte, curRound, amountToSend, transactionFee uint64, fromAccount, toAccount string, closeToAccount string) (txn v1.Transaction) { client := f.LibGoalClient - fundingTx, err := client.SendPaymentFromWallet(walletHandle, walletPassword, fromAccount, toAccount, transactionFee, amountToSend, nil, closeToAccount, 0, 0) + // use one curRound - 1 in case other nodes are behind + fundingTx, err := client.SendPaymentFromWallet(walletHandle, walletPassword, fromAccount, toAccount, transactionFee, amountToSend, nil, closeToAccount, basics.Round(curRound).SubSaturate(1), 0) require.NoError(f.t, err, "client should be able to send money from rich to poor account") require.NotEmpty(f.t, fundingTx.ID().String(), "transaction ID should not be empty") waitingDeadline := curRound + uint64(5)