Skip to content

Commit

Permalink
add reject votes from jailed finality provider
Browse files Browse the repository at this point in the history
  • Loading branch information
gitferry committed Sep 11, 2024
1 parent 7ec426d commit fe7bac6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions x/finality/keeper/msg_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,13 @@ func FuzzAddFinalitySig(f *testing.F) {
bsKeeper.EXPECT().GetFinalityProvider(gomock.Any(), gomock.Eq(fpBTCPKBytes)).Return(fp, nil).Times(1)
_, err = ms.AddFinalitySig(ctx, msg)
require.ErrorIs(t, err, bstypes.ErrFpAlreadySlashed)

// Case 7: jailed finality provider cannot vote
fp.Jailed = true
fp.SlashedBabylonHeight = 0
bsKeeper.EXPECT().GetFinalityProvider(gomock.Any(), gomock.Eq(fpBTCPKBytes)).Return(fp, nil).Times(1)
_, err = ms.AddFinalitySig(ctx, msg)
require.ErrorIs(t, err, bstypes.ErrFpAlreadyJailed)
})
}

Expand Down

0 comments on commit fe7bac6

Please sign in to comment.