Skip to content

Commit

Permalink
chore: address pr comments, set height 1 as voted
Browse files Browse the repository at this point in the history
  • Loading branch information
RafilxTenfen committed Jan 3, 2025
1 parent c72ce35 commit 1e4d230
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions x/finality/keeper/rewarding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,9 @@ func TestHandleRewardingWithGapsOfUnfinalizedBlocks(t *testing.T) {
fKeeper.SetBlock(ctx, &types.IndexedBlock{
Height: 1,
AppHash: datagen.GenRandomByteArray(r, 32),
Finalized: false,
Finalized: true,
})

fKeeper.SetBlock(ctx, &types.IndexedBlock{
Height: 2,
AppHash: datagen.GenRandomByteArray(r, 32),
Expand All @@ -151,12 +152,13 @@ func TestHandleRewardingWithGapsOfUnfinalizedBlocks(t *testing.T) {
BtcPk: fpPK,
TotalBondedSat: 1,
})
fKeeper.SetVotingPowerDistCache(ctx, 1, dc)
fKeeper.SetVotingPowerDistCache(ctx, 3, dc)

iKeeper.EXPECT().
RewardBTCStaking(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).
Return().
Times(1) // number of finalized blocks processed
Times(2) // number of finalized blocks processed

fKeeper.HandleRewarding(ctx, 3)

Expand Down

0 comments on commit 1e4d230

Please sign in to comment.