Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
strahe committed Aug 27, 2024
1 parent 9915792 commit f1672d0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
5 changes: 3 additions & 2 deletions cmd/boost/direct_deal.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ package main
import (
"bufio"
"fmt"
"github.com/ipfs/go-datastore"
ds_sync "github.com/ipfs/go-datastore/sync"
"os"
"strconv"
"strings"

"github.com/ipfs/go-datastore"
ds_sync "github.com/ipfs/go-datastore/sync"

bcli "github.com/filecoin-project/boost/cli"
clinode "github.com/filecoin-project/boost/cli/node"
"github.com/filecoin-project/boost/cmd"
Expand Down
4 changes: 2 additions & 2 deletions cmd/boostx/utils_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ var marketAddCmd = &cli.Command{
Params: params,
}

cid, sent, err := lib.SignAndPushToMpool(cctx, ctx, api, n, msg)
cid, sent, err := lib.SignAndPushToMpool(cctx, ctx, api, n, nil, msg)
if err != nil {
return err
}
Expand Down Expand Up @@ -166,7 +166,7 @@ var marketWithdrawCmd = &cli.Command{
Params: params,
}

cid, sent, err := lib.SignAndPushToMpool(cctx, ctx, api, n, msg)
cid, sent, err := lib.SignAndPushToMpool(cctx, ctx, api, n, nil, msg)
if err != nil {
return err
}
Expand Down
3 changes: 3 additions & 0 deletions cmd/lib/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ func getLegacyDealsFSM(ctx context.Context, ds *backupds.Datastore) (fsm.Group,
}

func SignAndPushToMpool(cctx *cli.Context, ctx context.Context, api api.Gateway, n *clinode.Node, ds *ds_sync.MutexDatastore, msg *types.Message) (cid cid.Cid, sent bool, err error) {
if ds == nil {
ds = ds_sync.MutexWrap(datastore.NewMapDatastore())
}
vmessagesigner := messagesigner.NewMessageSigner(n.Wallet, &modules.MpoolNonceAPI{ChainModule: api, StateModule: api}, ds)

head, err := api.ChainHead(ctx)
Expand Down

0 comments on commit f1672d0

Please sign in to comment.