Skip to content
This repository was archived by the owner on Jan 24, 2025. It is now read-only.

Commit c307b3c

Browse files
committed
Fix Test_Account_StakeAmountCalculation
1 parent 5b66c5f commit c307b3c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pkg/tests/reward_test.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -373,10 +373,13 @@ func Test_Account_StakeAmountCalculation(t *testing.T) {
373373
)
374374
block7 := lo.PanicOnErr(ts.IssueBasicBlockWithOptions("block7", ts.DefaultWallet(), tx7, mock.WithStrongParents(latestParents...)))
375375

376+
latestParents = ts.CommitUntilSlot(block7_8Slot, block7.ID())
377+
376378
tx8 := ts.DefaultWallet().ClaimDelegatorRewards("TX8", "TX7:0")
377-
block8 := lo.PanicOnErr(ts.IssueBasicBlockWithOptions("block8", ts.DefaultWallet(), tx8, mock.WithStrongParents(block7.ID())))
379+
block8 := lo.PanicOnErr(ts.IssueBasicBlockWithOptions("block8", ts.DefaultWallet(), tx8, mock.WithStrongParents(latestParents...)))
378380

379-
latestParents = ts.CommitUntilSlot(block7_8Slot, block8.ID())
381+
block8Slot := ts.CurrentSlot()
382+
latestParents = ts.CommitUntilSlot(block8Slot, block8.ID())
380383

381384
// Delegated Stake should be unaffected since no new delegation was effectively added in that slot.
382385
ts.AssertAccountStake(accountID, stakedAmount, deleg1+deleg2, ts.Nodes()...)

0 commit comments

Comments
 (0)