Skip to content

Commit

Permalink
fix: strategy enum
Browse files Browse the repository at this point in the history
  • Loading branch information
BarryTong65 committed Mar 5, 2024
1 parent b8e69c7 commit 9216e82
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion proto/greenfield/virtualgroup/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ option go_package = "github.com/bnb-chain/greenfield/x/virtualgroup/types";
enum PickVGFStrategy {
option (gogoproto.goproto_enum_prefix) = false;

StrategyMaximizeFreeStoreSize = 0;
Strategy_Maximize_Free_Store_Size = 0;
}
8 changes: 4 additions & 4 deletions swagger/static/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6491,8 +6491,8 @@ paths:
required: false
type: string
enum:
- StrategyMaximizeFreeStoreSize
default: StrategyMaximizeFreeStoreSize
- Strategy_Maximize_Free_Store_Size
default: Strategy_Maximize_Free_Store_Size
tags:
- Query
/greenfield/virtualgroup/swap_in_info:
Expand Down Expand Up @@ -37240,8 +37240,8 @@ definitions:
greenfield.virtualgroup.PickVGFStrategy:
type: string
enum:
- StrategyMaximizeFreeStoreSize
default: StrategyMaximizeFreeStoreSize
- Strategy_Maximize_Free_Store_Size
default: Strategy_Maximize_Free_Store_Size
title: >-
PickVGFStrategy represents the method for selecting the best global
virtual group family based on the strategy
Expand Down
2 changes: 1 addition & 1 deletion x/virtualgroup/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ func (k Keeper) QuerySpOptimalGlobalVirtualGroupFamily(goCtx context.Context, re
var freeStoreSize float64
var currentFreeStoreSize float64
switch req.PickVgfStrategy {
case types.StrategyMaximizeFreeStoreSize:
case types.Strategy_Maximize_Free_Store_Size:
for _, gvgfID := range stats.GlobalVirtualGroupFamilyIds {
gvgFamily, found := k.GetGVGFamily(ctx, gvgfID)
if !found {
Expand Down
26 changes: 13 additions & 13 deletions x/virtualgroup/types/common.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion x/virtualgroup/types/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9216e82

Please sign in to comment.