feat(deps): update go-fil-markets

Update to latest 0.2.0 release of go-fil-markets with less-blocking node io
This commit is contained in:
hannahhoward
2020-05-04 18:36:51 -07:00
parent 299a017ef5
commit a9866c757e
19 changed files with 112 additions and 108 deletions
+3 -3
View File
@@ -5,7 +5,7 @@ import (
"errors"
"github.com/filecoin-project/go-fil-markets/pieceio"
ipldfree "github.com/ipld/go-ipld-prime/impl/free"
basicnode "github.com/ipld/go-ipld-prime/node/basic"
"github.com/ipld/go-ipld-prime/traversal/selector"
"github.com/ipld/go-ipld-prime/traversal/selector/builder"
@@ -15,7 +15,6 @@ import (
"golang.org/x/xerrors"
"github.com/ipfs/go-blockservice"
"github.com/ipfs/go-car"
"github.com/ipfs/go-cid"
"github.com/ipfs/go-filestore"
chunker "github.com/ipfs/go-ipfs-chunker"
@@ -26,6 +25,7 @@ import (
unixfile "github.com/ipfs/go-unixfs/file"
"github.com/ipfs/go-unixfs/importer/balanced"
ihelper "github.com/ipfs/go-unixfs/importer/helpers"
"github.com/ipld/go-car"
"github.com/libp2p/go-libp2p-core/peer"
"go.uber.org/fx"
@@ -425,7 +425,7 @@ func (a *API) ClientGenCar(ctx context.Context, ref api.FileRef, outputPath stri
}
defer bufferedDS.Remove(ctx, c)
ssb := builder.NewSelectorSpecBuilder(ipldfree.NodeBuilder())
ssb := builder.NewSelectorSpecBuilder(basicnode.Style.Any)
// entire DAG selector
allSelector := ssb.ExploreRecursive(selector.RecursionLimitNone(),
+2 -1
View File
@@ -8,6 +8,7 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/lotus/chain/market"
"github.com/filecoin-project/lotus/chain/types"
"github.com/ipfs/go-cid"
)
type MarketAPI struct {
@@ -16,6 +17,6 @@ type MarketAPI struct {
FMgr *market.FundMgr
}
func (a *MarketAPI) MarketEnsureAvailable(ctx context.Context, addr, wallet address.Address, amt types.BigInt) error {
func (a *MarketAPI) MarketEnsureAvailable(ctx context.Context, addr, wallet address.Address, amt types.BigInt) (cid.Cid, error) {
return a.FMgr.EnsureAvailable(ctx, addr, wallet, amt)
}
+1 -1
View File
@@ -7,9 +7,9 @@ import (
"github.com/ipfs/go-bitswap"
"github.com/ipfs/go-bitswap/network"
"github.com/ipfs/go-blockservice"
"github.com/ipfs/go-car"
"github.com/ipfs/go-datastore"
blockstore "github.com/ipfs/go-ipfs-blockstore"
"github.com/ipld/go-car"
"github.com/libp2p/go-libp2p-core/host"
"github.com/libp2p/go-libp2p-core/routing"
pubsub "github.com/libp2p/go-libp2p-pubsub"
+3 -2
View File
@@ -68,8 +68,9 @@ func RegisterClientValidator(crv *requestvalidation.ClientRequestValidator, dtm
// NewClientGraphsyncDataTransfer returns a data transfer manager that just
// uses the clients's Client DAG service for transfers
func NewClientGraphsyncDataTransfer(h host.Host, gs dtypes.Graphsync) dtypes.ClientDataTransfer {
return graphsyncimpl.NewGraphSyncDataTransfer(h, gs)
func NewClientGraphsyncDataTransfer(h host.Host, gs dtypes.Graphsync, ds dtypes.MetadataDS) dtypes.ClientDataTransfer {
sc := storedcounter.New(ds, datastore.NewKey("/datatransfer/client/counter"))
return graphsyncimpl.NewGraphSyncDataTransfer(h, gs, sc)
}
// NewClientDealStore creates a statestore for the client to store its deals
+3 -2
View File
@@ -199,8 +199,9 @@ func RegisterProviderValidator(mrv *requestvalidation.ProviderRequestValidator,
// NewProviderDAGServiceDataTransfer returns a data transfer manager that just
// uses the provider's Staging DAG service for transfers
func NewProviderDAGServiceDataTransfer(h host.Host, gs dtypes.StagingGraphsync) dtypes.ProviderDataTransfer {
return dtgraphsync.NewGraphSyncDataTransfer(h, gs)
func NewProviderDAGServiceDataTransfer(h host.Host, gs dtypes.StagingGraphsync, ds dtypes.MetadataDS) dtypes.ProviderDataTransfer {
sc := storedcounter.New(ds, datastore.NewKey("/datatransfer/provider/counter"))
return dtgraphsync.NewGraphSyncDataTransfer(h, gs, sc)
}
// NewProviderDealStore creates a statestore for the client to store its deals
+1 -1
View File
@@ -10,11 +10,11 @@ import (
"time"
"github.com/ipfs/go-blockservice"
"github.com/ipfs/go-car"
"github.com/ipfs/go-cid"
offline "github.com/ipfs/go-ipfs-exchange-offline"
logging "github.com/ipfs/go-log/v2"
"github.com/ipfs/go-merkledag"
"github.com/ipld/go-car"
"github.com/mitchellh/go-homedir"
"golang.org/x/xerrors"