Skip to content

Commit

Permalink
fix:fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
trestinlsd committed Jul 2, 2024
1 parent b72cfab commit 3978cbd
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 341 deletions.
6 changes: 1 addition & 5 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -570,11 +570,7 @@ func NewExocoreApp(
)

(&app.EpochsKeeper).SetHooks(
epochskeeper.NewMultiEpochHooks(
// insert epoch hooks receivers here
app.AVSManagerKeeper.Hooks(),
app.StakingKeeper.EpochsHooks(),
),
app.StakingKeeper.EpochsHooks(),
)

// these two modules aren't finalized yet.
Expand Down
20 changes: 10 additions & 10 deletions precompiles/avsTask/task_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,16 @@ func (s *TaskPrecompileTestSuite) TestRunRegTaskinfo() {
_, byteData, _ := bech32.DecodeToBase256(avsAddres)
caller := "0x" + hex.EncodeToString(byteData)
avs := &types.AVSInfo{
Name: avsName,
AvsAddress: avsAddres,
SlashAddr: slashAddress,
AvsOwnerAddress: avsOwnerAddress,
AssetId: assetID,
AvsUnbondingPeriod: uint32(7),
MinSelfDelegation: sdk.NewIntFromUint64(10),
OperatorAddress: nil,
EpochIdentifier: epochstypes.DayEpochID,
EffectiveCurrentEpoch: 1,
Name: avsName,
AvsAddress: avsAddres,
SlashAddr: slashAddress,
AvsOwnerAddress: avsOwnerAddress,
AssetId: assetID,
AvsUnbondingPeriod: uint32(7),
MinSelfDelegation: sdk.NewIntFromUint64(10),
OperatorAddress: nil,
EpochIdentifier: epochstypes.DayEpochID,
StartingEpoch: 1,
}

registerAvs := func() {
Expand Down
27 changes: 17 additions & 10 deletions x/avs/keeper/avs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ func (suite *AVSTestSuite) TestAVS() {
avsOwnerAddress := []string{"exo13h6xg79g82e2g2vhjwg7j4r2z2hlncelwutkjr", "exo13h6xg79g82e2g2vhjwg7j4r2z2hlncelwutkj1", "exo13h6xg79g82e2g2vhjwg7j4r2z2hlncelwutkj2"}
assetID := []string{"11", "22", "33"}
avs := &types.AVSInfo{
Name: avsName,
AvsAddress: avsAddres,
SlashAddr: slashAddress,
AvsOwnerAddress: avsOwnerAddress,
AssetId: assetID,
AvsUnbondingPeriod: uint32(7),
MinSelfDelegation: sdk.NewIntFromUint64(10),
OperatorAddress: nil,
EpochIdentifier: epochstypes.DayEpochID,
EffectiveCurrentEpoch: 1,
Name: avsName,
AvsAddress: avsAddres,
SlashAddr: slashAddress,
AvsOwnerAddress: avsOwnerAddress,
AssetId: assetID,
AvsUnbondingPeriod: uint32(7),
MinSelfDelegation: sdk.NewIntFromUint64(10),
OperatorAddress: nil,
EpochIdentifier: epochstypes.DayEpochID,
StartingEpoch: 1,
}

err := suite.App.AVSManagerKeeper.SetAVSInfo(suite.Ctx, avs)
Expand All @@ -35,6 +35,13 @@ func (suite *AVSTestSuite) TestAVS() {

suite.NoError(err)
suite.Equal(avsAddres, info.GetInfo().AvsAddress)

var avsList []types.AVSInfo
suite.App.AVSManagerKeeper.IterateAVSInfo(suite.Ctx, func(_ int64, epochEndAVSInfo types.AVSInfo) (stop bool) {
avsList = append(avsList, epochEndAVSInfo)
return false
})
suite.Equal(len(avsList), 1)
}

func (suite *AVSTestSuite) TestAVSInfoUpdate_Register() {
Expand Down
286 changes: 0 additions & 286 deletions x/avs/keeper/hooks_test.go

This file was deleted.

Loading

0 comments on commit 3978cbd

Please sign in to comment.