fix lint and gen errors.

This commit is contained in:
Raúl Kripalani 2021-07-26 23:32:51 +01:00
parent 9bdbbf33cb
commit 160fab08aa
11 changed files with 21 additions and 5 deletions

View File

@ -5,6 +5,7 @@ package exchange
import ( import (
"fmt" "fmt"
"io" "io"
"math"
"sort" "sort"
types "github.com/filecoin-project/lotus/chain/types" types "github.com/filecoin-project/lotus/chain/types"
@ -15,6 +16,7 @@ import (
var _ = xerrors.Errorf var _ = xerrors.Errorf
var _ = cid.Undef var _ = cid.Undef
var _ = math.E
var _ = sort.Sort var _ = sort.Sort
var lengthBufRequest = []byte{131} var lengthBufRequest = []byte{131}

View File

@ -5,6 +5,7 @@ package market
import ( import (
"fmt" "fmt"
"io" "io"
"math"
"sort" "sort"
cid "github.com/ipfs/go-cid" cid "github.com/ipfs/go-cid"
@ -14,6 +15,7 @@ import (
var _ = xerrors.Errorf var _ = xerrors.Errorf
var _ = cid.Undef var _ = cid.Undef
var _ = math.E
var _ = sort.Sort var _ = sort.Sort
var lengthBufFundedAddressState = []byte{131} var lengthBufFundedAddressState = []byte{131}

View File

@ -5,6 +5,7 @@ package types
import ( import (
"fmt" "fmt"
"io" "io"
"math"
"sort" "sort"
abi "github.com/filecoin-project/go-state-types/abi" abi "github.com/filecoin-project/go-state-types/abi"
@ -18,6 +19,7 @@ import (
var _ = xerrors.Errorf var _ = xerrors.Errorf
var _ = cid.Undef var _ = cid.Undef
var _ = math.E
var _ = sort.Sort var _ = sort.Sort
var lengthBufBlockHeader = []byte{144} var lengthBufBlockHeader = []byte{144}

View File

@ -5,6 +5,7 @@ package chaos
import ( import (
"fmt" "fmt"
"io" "io"
"math"
"sort" "sort"
address "github.com/filecoin-project/go-address" address "github.com/filecoin-project/go-address"
@ -17,6 +18,7 @@ import (
var _ = xerrors.Errorf var _ = xerrors.Errorf
var _ = cid.Undef var _ = cid.Undef
var _ = math.E
var _ = sort.Sort var _ = sort.Sort
var lengthBufState = []byte{130} var lengthBufState = []byte{130}

View File

@ -5,6 +5,7 @@ package sectorstorage
import ( import (
"fmt" "fmt"
"io" "io"
"math"
"sort" "sort"
sealtasks "github.com/filecoin-project/lotus/extern/sector-storage/sealtasks" sealtasks "github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
@ -15,6 +16,7 @@ import (
var _ = xerrors.Errorf var _ = xerrors.Errorf
var _ = cid.Undef var _ = cid.Undef
var _ = math.E
var _ = sort.Sort var _ = sort.Sort
func (t *Call) MarshalCBOR(w io.Writer) error { func (t *Call) MarshalCBOR(w io.Writer) error {

View File

@ -5,6 +5,7 @@ package storiface
import ( import (
"fmt" "fmt"
"io" "io"
"math"
"sort" "sort"
cid "github.com/ipfs/go-cid" cid "github.com/ipfs/go-cid"
@ -14,6 +15,7 @@ import (
var _ = xerrors.Errorf var _ = xerrors.Errorf
var _ = cid.Undef var _ = cid.Undef
var _ = math.E
var _ = sort.Sort var _ = sort.Sort
func (t *CallID) MarshalCBOR(w io.Writer) error { func (t *CallID) MarshalCBOR(w io.Writer) error {

View File

@ -5,6 +5,7 @@ package sealing
import ( import (
"fmt" "fmt"
"io" "io"
"math"
"sort" "sort"
abi "github.com/filecoin-project/go-state-types/abi" abi "github.com/filecoin-project/go-state-types/abi"
@ -17,6 +18,7 @@ import (
var _ = xerrors.Errorf var _ = xerrors.Errorf
var _ = cid.Undef var _ = cid.Undef
var _ = math.E
var _ = sort.Sort var _ = sort.Sort
func (t *Piece) MarshalCBOR(w io.Writer) error { func (t *Piece) MarshalCBOR(w io.Writer) error {

View File

@ -4,12 +4,12 @@ import (
"context" "context"
"io" "io"
"github.com/filecoin-project/go-fil-markets/shared"
"github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
"golang.org/x/xerrors" "golang.org/x/xerrors"
"github.com/filecoin-project/go-fil-markets/piecestore" "github.com/filecoin-project/go-fil-markets/piecestore"
"github.com/filecoin-project/go-fil-markets/retrievalmarket" "github.com/filecoin-project/go-fil-markets/retrievalmarket"
"github.com/filecoin-project/go-fil-markets/shared"
) )
type LotusAccessor interface { type LotusAccessor interface {
@ -27,7 +27,7 @@ type lotusAccessor struct {
var _ LotusAccessor = (*lotusAccessor)(nil) var _ LotusAccessor = (*lotusAccessor)(nil)
func NewLotusAccessor(store piecestore.PieceStore, rm retrievalmarket.RetrievalProviderNode) *lotusAccessor { func NewLotusAccessor(store piecestore.PieceStore, rm retrievalmarket.RetrievalProviderNode) LotusAccessor {
return &lotusAccessor{ return &lotusAccessor{
pieceStore: store, pieceStore: store,
rm: rm, rm: rm,
@ -59,9 +59,6 @@ func (m *lotusAccessor) Start(ctx context.Context) error {
} }
return err return err
} }
// Piece store has started up successfully
return nil
} }
func (m *lotusAccessor) FetchUnsealedPiece(ctx context.Context, pieceCid cid.Cid) (io.ReadCloser, error) { func (m *lotusAccessor) FetchUnsealedPiece(ctx context.Context, pieceCid cid.Cid) (io.ReadCloser, error) {

View File

@ -60,6 +60,7 @@ func TestLotusAccessorFetchUnsealedPiece(t *testing.T) {
}} }}
for _, tc := range testCases { for _, tc := range testCases {
tc := tc
t.Run(tc.name, func(t *testing.T) { t.Run(tc.name, func(t *testing.T) {
ps := getPieceStore(t) ps := getPieceStore(t)
rpn := &mockRPN{ rpn := &mockRPN{

View File

@ -5,6 +5,7 @@ package hello
import ( import (
"fmt" "fmt"
"io" "io"
"math"
"sort" "sort"
abi "github.com/filecoin-project/go-state-types/abi" abi "github.com/filecoin-project/go-state-types/abi"
@ -15,6 +16,7 @@ import (
var _ = xerrors.Errorf var _ = xerrors.Errorf
var _ = cid.Undef var _ = cid.Undef
var _ = math.E
var _ = sort.Sort var _ = sort.Sort
var lengthBufHelloMessage = []byte{132} var lengthBufHelloMessage = []byte{132}

View File

@ -5,6 +5,7 @@ package paychmgr
import ( import (
"fmt" "fmt"
"io" "io"
"math"
"sort" "sort"
address "github.com/filecoin-project/go-address" address "github.com/filecoin-project/go-address"
@ -16,6 +17,7 @@ import (
var _ = xerrors.Errorf var _ = xerrors.Errorf
var _ = cid.Undef var _ = cid.Undef
var _ = math.E
var _ = sort.Sort var _ = sort.Sort
func (t *VoucherInfo) MarshalCBOR(w io.Writer) error { func (t *VoucherInfo) MarshalCBOR(w io.Writer) error {