Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: handle on close channel #192

Merged
merged 2 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading