Skip to content

Commit

Permalink
chore: make lint happy
Browse files Browse the repository at this point in the history
  • Loading branch information
hunjixin committed Jan 5, 2023
1 parent 418f5d5 commit 5a0d802
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 36 deletions.
14 changes: 6 additions & 8 deletions cli/actor_cfg.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import (
"sort"
"strconv"

"github.com/filecoin-project/go-state-types/big"

actors2 "github.com/filecoin-project/venus/venus-shared/actors"

"github.com/filecoin-project/venus/venus-shared/utils"
Expand Down Expand Up @@ -136,7 +134,7 @@ var updateActorCfgCmd = &cli.Command{
if err != nil {
return fmt.Errorf("parsing feecap failed %v", err)
}
changeGasSpecParams.GasFeeCap = big.Int(gasFeeCap)
changeGasSpecParams.GasFeeCap = gasFeeCap
}

if ctx.IsSet(maxFeeFlag.Name) {
Expand All @@ -145,7 +143,7 @@ var updateActorCfgCmd = &cli.Command{
if err != nil {
return fmt.Errorf("parsing maxfee failed %v", err)
}
changeGasSpecParams.MaxFee = big.Int(maxfee)
changeGasSpecParams.MaxFee = maxfee
}

if ctx.IsSet(basefeeFlag.Name) {
Expand All @@ -154,7 +152,7 @@ var updateActorCfgCmd = &cli.Command{
if err != nil {
return fmt.Errorf("parsing maxfee failed %v", err)
}
changeGasSpecParams.BaseFee = big.Int(basefee)
changeGasSpecParams.BaseFee = basefee
}
if !hasUpdate {
return errors.New("no new params to update")
Expand Down Expand Up @@ -245,7 +243,7 @@ var addActorCfgCmd = &cli.Command{
if err != nil {
return fmt.Errorf("parsing feecap failed %v", err)
}
newActorCfg.GasFeeCap = big.Int(gasFeeCap)
newActorCfg.GasFeeCap = gasFeeCap
}

if ctx.IsSet(maxFeeFlag.Name) {
Expand All @@ -254,7 +252,7 @@ var addActorCfgCmd = &cli.Command{
if err != nil {
return fmt.Errorf("parsing maxfee failed %v", err)
}
newActorCfg.MaxFee = big.Int(maxfee)
newActorCfg.MaxFee = maxfee
}

if ctx.IsSet(basefeeFlag.Name) {
Expand All @@ -263,7 +261,7 @@ var addActorCfgCmd = &cli.Command{
if err != nil {
return fmt.Errorf("parsing maxfee failed %v", err)
}
newActorCfg.BaseFee = big.Int(basefee)
newActorCfg.BaseFee = basefee
}
if !hasArgument {
return errors.New("no argument to save")
Expand Down
6 changes: 0 additions & 6 deletions cli/flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,6 @@ var outputTypeFlag = &cli.StringFlag{
Value: "table",
}

var uuidFlag = &cli.StringFlag{
Name: "id",
Usage: "uuid type, ",
Required: true,
}

var FromFlag = &cli.StringFlag{
Name: "from",
Usage: "address to send message",
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/filecoin-project/go-jsonrpc v0.1.5
github.com/filecoin-project/go-state-types v0.9.8
github.com/filecoin-project/specs-actors/v5 v5.0.6
github.com/filecoin-project/venus v1.9.0-rc1.0.20230105032048-c8d0f0e9a9b7
github.com/filecoin-project/venus v1.9.0-rc1.0.20230105034113-333817b172f5
github.com/filecoin-project/venus-auth v1.9.0
github.com/golang/mock v1.6.0
github.com/google/uuid v1.3.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,8 @@ github.com/filecoin-project/specs-storage v0.4.1/go.mod h1:Z2eK6uMwAOSLjek6+sy0j
github.com/filecoin-project/storetheindex v0.3.5/go.mod h1:0r3d0kSpK63O6AvLr1CjAINLi+nWD49clzcnKV+GLpI=
github.com/filecoin-project/test-vectors/schema v0.0.5/go.mod h1:iQ9QXLpYWL3m7warwvK1JC/pTri8mnfEmKygNDqqY6E=
github.com/filecoin-project/venus v1.2.4/go.mod h1:hJULXHGAnWuq5S5KRtPkwbT8DqgM9II7NwyNU7t59D0=
github.com/filecoin-project/venus v1.9.0-rc1.0.20230105032048-c8d0f0e9a9b7 h1:PtTQo4scSMGo5kplvMZDVwRMpZ0V9IbJrgpn/IqVIp0=
github.com/filecoin-project/venus v1.9.0-rc1.0.20230105032048-c8d0f0e9a9b7/go.mod h1:BJn0TSnkDTX8R3duiCpgPKDYU5ybrPCgJlkxZi/wmTs=
github.com/filecoin-project/venus v1.9.0-rc1.0.20230105034113-333817b172f5 h1:ZqG1/Hxa1I1TYUqL4zsegy3HTfcRK/ljJqE8Otduwp0=
github.com/filecoin-project/venus v1.9.0-rc1.0.20230105034113-333817b172f5/go.mod h1:BJn0TSnkDTX8R3duiCpgPKDYU5ybrPCgJlkxZi/wmTs=
github.com/filecoin-project/venus-auth v1.3.2/go.mod h1:m5Jog2GYxztwP7w3m/iJdv/V1/bTcAVU9rm/CbhxRQU=
github.com/filecoin-project/venus-auth v1.9.0 h1:GH0o/jPdF55/U/uLoMzrqR9+DOsMf5oWM/X4UPuyWPA=
github.com/filecoin-project/venus-auth v1.9.0/go.mod h1:Ckj8F/iuSgXnCb9LvH0IiPR7swJZQAhabDOxVycLGWs=
Expand Down
6 changes: 0 additions & 6 deletions integration_test/actor_cfg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (

"github.com/filecoin-project/venus/venus-shared/api/messager"

"github.com/filecoin-project/go-address"
"github.com/filecoin-project/venus-messager/config"
"github.com/filecoin-project/venus-messager/testhelper"
types "github.com/filecoin-project/venus/venus-shared/types/messager"
Expand Down Expand Up @@ -41,11 +40,6 @@ func TestActorCfgAPI(t *testing.T) {
assert.NoError(t, err)
defer closer()

allAddrs := make([]address.Address, 0, len(addrs))
for _, addr := range addrs {
allAddrs = append(allAddrs, testhelper.ResolveAddr(t, addr))
}

actorCfgs := make([]*types.ActorCfg, 5)
testutil.Provide(t, &actorCfgs)

Expand Down
8 changes: 0 additions & 8 deletions models/mtypes/db_cid.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,3 @@ func (c DBCid) String() string {
func (c DBCid) Cid() cid.Cid {
return cid.Cid(c)
}

func (c DBCid) cidPtr() *cid.Cid {
if c == UndefDBCid {
return nil
}
cid := cid.Cid(c)
return &cid
}
2 changes: 1 addition & 1 deletion models/sqlite/actor_cfg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func Test_fromActorCfg(t *testing.T) {
}

for _, actorCfg := range expectActorCfgs[5:] {
assert.NoError(t, actorCfgRepo.DelActorCfgByMethodType(ctx, &types.MethodType{actorCfg.Code, actorCfg.Method}))
assert.NoError(t, actorCfgRepo.DelActorCfgByMethodType(ctx, &types.MethodType{Code: actorCfg.Code, Method: actorCfg.Method}))
}

actorsR, err := actorCfgRepo.ListActorCfg(ctx)
Expand Down
4 changes: 0 additions & 4 deletions models/sqlite/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ type FeeSpec struct {

type sqliteUint64 uint64

func newSqliteUint64(val uint64) sqliteUint64 {
return sqliteUint64(val)
}

func (c *sqliteUint64) Scan(value interface{}) error {
switch value := value.(type) {
case int64:
Expand Down

0 comments on commit 5a0d802

Please sign in to comment.