Skip to content

Commit

Permalink
Merge pull request #192 from osmosis-labs/trinity/handle-on-close-cha…
Browse files Browse the repository at this point in the history
…nnel-logic

feat: handle on close channel
  • Loading branch information
vuong177 authored Sep 6, 2024
2 parents c9f14a2 + 9f88ecd commit df5db2f
Show file tree
Hide file tree
Showing 15 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tests/e2e/e2e.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ type example struct {
ProviderDenom string
ConsumerDenom string
MyProvChainActor string
MaxRetrieve uint16
MaxRetrieve uint32
}

func setupExampleChains(t *testing.T) example {
Expand Down
Binary file modified tests/testdata/mesh_converter.wasm.gz
Binary file not shown.
Binary file modified tests/testdata/mesh_external_staking.wasm.gz
Binary file not shown.
Binary file modified tests/testdata/mesh_native_staking.wasm.gz
Binary file not shown.
Binary file modified tests/testdata/mesh_native_staking_proxy.wasm.gz
Binary file not shown.
Binary file modified tests/testdata/mesh_osmosis_price_provider.wasm.gz
Binary file not shown.
Binary file modified tests/testdata/mesh_remote_price_feed.wasm.gz
Binary file not shown.
Binary file modified tests/testdata/mesh_simple_price_feed.wasm.gz
Binary file not shown.
Binary file modified tests/testdata/mesh_vault.wasm.gz
Binary file not shown.
Binary file modified tests/testdata/mesh_virtual_staking.wasm.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion tests/testdata/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7cf179e7c5f4a59264b062d7cefe24006f2ba84e
9c1a08272a3c580544ae4978bb40ca56f38d6d71
2 changes: 1 addition & 1 deletion x/meshsecurity/contract/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type (
}
AllDelegationsQuery struct {
Contract string `json:"contract"`
MaxRetrieve uint16 `json:"max_retrieve"`
MaxRetrieve uint32 `json:"max_retrieve"`
}
AllDelegationsResponse struct {
Delegations []Delegation `json:"delegations"`
Expand Down
2 changes: 1 addition & 1 deletion x/meshsecurity/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (k Keeper) GetDelegation(ctx sdk.Context, actor, delAddr sdk.AccAddress, va
}

// GetAllDelegations returns all delegations for a specific contract
func (k Keeper) GetAllDelegations(ctx sdk.Context, actor sdk.AccAddress, maxRetrieve uint16) (delegations []types.Delegation) {
func (k Keeper) GetAllDelegations(ctx sdk.Context, actor sdk.AccAddress, maxRetrieve uint32) (delegations []types.Delegation) {
delegations = make([]types.Delegation, maxRetrieve)
store := ctx.KVStore(k.storeKey)
contractPrefixKey := types.BuildDelegationsKey(actor)
Expand Down
2 changes: 1 addition & 1 deletion x/meshsecurity/keeper/query_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type (
viewKeeper interface {
GetMaxCapLimit(ctx sdk.Context, actor sdk.AccAddress) sdk.Coin
GetTotalDelegated(ctx sdk.Context, actor sdk.AccAddress) sdk.Coin
GetAllDelegations(ctx sdk.Context, actor sdk.AccAddress, maxRetrieve uint16) []types.Delegation
GetAllDelegations(ctx sdk.Context, actor sdk.AccAddress, maxRetrieve uint32) []types.Delegation
}
stakingKeeper interface {
BondDenom(ctx sdk.Context) string
Expand Down
6 changes: 3 additions & 3 deletions x/meshsecurity/keeper/query_plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func TestChainedCustomQuerier(t *testing.T) {
GetTotalDelegatedFn: func(ctx sdk.Context, actor sdk.AccAddress) sdk.Coin {
return sdk.NewCoin("ALX", math.NewInt(456))
},
GetAllDelegationsFn: func(ctx sdk.Context, actor sdk.AccAddress, maxRetrieve uint16) []types.Delegation {
GetAllDelegationsFn: func(ctx sdk.Context, actor sdk.AccAddress, maxRetrieve uint32) []types.Delegation {
return []types.Delegation{}
},
},
Expand Down Expand Up @@ -91,7 +91,7 @@ var _ viewKeeper = &MockViewKeeper{}
type MockViewKeeper struct {
GetMaxCapLimitFn func(ctx sdk.Context, actor sdk.AccAddress) sdk.Coin
GetTotalDelegatedFn func(ctx sdk.Context, actor sdk.AccAddress) sdk.Coin
GetAllDelegationsFn func(ctx sdk.Context, actor sdk.AccAddress, maxRetrieve uint16) []types.Delegation
GetAllDelegationsFn func(ctx sdk.Context, actor sdk.AccAddress, maxRetrieve uint32) []types.Delegation
}

func (m MockViewKeeper) GetMaxCapLimit(ctx sdk.Context, actor sdk.AccAddress) sdk.Coin {
Expand All @@ -108,7 +108,7 @@ func (m MockViewKeeper) GetTotalDelegated(ctx sdk.Context, actor sdk.AccAddress)
return m.GetTotalDelegatedFn(ctx, actor)
}

func (m MockViewKeeper) GetAllDelegations(ctx sdk.Context, actor sdk.AccAddress, maxRetrieve uint16) []types.Delegation {
func (m MockViewKeeper) GetAllDelegations(ctx sdk.Context, actor sdk.AccAddress, maxRetrieve uint32) []types.Delegation {
if m.GetAllDelegationsFn == nil {
panic("not expected to be called")
}
Expand Down

0 comments on commit df5db2f

Please sign in to comment.