retrieval: resolve some TODOs
This commit is contained in:
parent
a43890dc76
commit
fe6d5ff3a8
@ -216,7 +216,7 @@ func (o *QueryOffer) Order() RetrievalOrder {
|
||||
}
|
||||
|
||||
type RetrievalOrder struct {
|
||||
// TODO: make this loss unixfs specific
|
||||
// TODO: make this less unixfs specific
|
||||
Root cid.Cid
|
||||
Size uint64
|
||||
// TODO: support offset
|
||||
|
@ -212,7 +212,6 @@ func (c *Client) VerifyParams(ctx context.Context, data cid.Cid) (*actors.PieceI
|
||||
}
|
||||
|
||||
func (c *Client) Start(ctx context.Context, p ClientDealProposal, vd *actors.PieceInclVoucherData) (cid.Cid, error) {
|
||||
// TODO: use data
|
||||
proposal := StorageDealProposal{
|
||||
PieceRef: p.Data,
|
||||
SerializationMode: SerializationUnixFs,
|
||||
|
@ -3,8 +3,8 @@ package gen
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/filecoin-project/go-lotus/build"
|
||||
|
||||
"github.com/filecoin-project/go-lotus/build"
|
||||
actors "github.com/filecoin-project/go-lotus/chain/actors"
|
||||
"github.com/filecoin-project/go-lotus/chain/address"
|
||||
"github.com/filecoin-project/go-lotus/chain/state"
|
||||
|
@ -3,7 +3,6 @@ package node
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"github.com/filecoin-project/go-lotus/retrieval"
|
||||
"reflect"
|
||||
"time"
|
||||
|
||||
@ -36,6 +35,7 @@ import (
|
||||
"github.com/filecoin-project/go-lotus/node/modules/testing"
|
||||
"github.com/filecoin-project/go-lotus/node/repo"
|
||||
"github.com/filecoin-project/go-lotus/paych"
|
||||
"github.com/filecoin-project/go-lotus/retrieval"
|
||||
"github.com/filecoin-project/go-lotus/retrieval/discovery"
|
||||
"github.com/filecoin-project/go-lotus/storage"
|
||||
"github.com/filecoin-project/go-lotus/storage/sector"
|
||||
|
@ -3,16 +3,16 @@ package impl
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/filecoin-project/go-lotus/build"
|
||||
"github.com/filecoin-project/go-lotus/storage/sectorblocks"
|
||||
"io"
|
||||
"math/rand"
|
||||
|
||||
"github.com/filecoin-project/go-lotus/api"
|
||||
"github.com/filecoin-project/go-lotus/build"
|
||||
"github.com/filecoin-project/go-lotus/chain/address"
|
||||
"github.com/filecoin-project/go-lotus/lib/sectorbuilder"
|
||||
"github.com/filecoin-project/go-lotus/storage"
|
||||
"github.com/filecoin-project/go-lotus/storage/sector"
|
||||
"github.com/filecoin-project/go-lotus/storage/sectorblocks"
|
||||
)
|
||||
|
||||
type StorageMinerAPI struct {
|
||||
|
@ -2,8 +2,6 @@ package modules
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/filecoin-project/go-lotus/retrieval/discovery"
|
||||
"github.com/filecoin-project/go-lotus/storage/sector"
|
||||
|
||||
"github.com/libp2p/go-libp2p-core/host"
|
||||
inet "github.com/libp2p/go-libp2p-core/network"
|
||||
@ -15,6 +13,8 @@ import (
|
||||
"github.com/filecoin-project/go-lotus/chain/sub"
|
||||
"github.com/filecoin-project/go-lotus/node/hello"
|
||||
"github.com/filecoin-project/go-lotus/node/modules/helpers"
|
||||
"github.com/filecoin-project/go-lotus/retrieval/discovery"
|
||||
"github.com/filecoin-project/go-lotus/storage/sector"
|
||||
)
|
||||
|
||||
func RunHello(mctx helpers.MetricsCtx, lc fx.Lifecycle, h host.Host, svc *hello.Service) {
|
||||
|
@ -2,31 +2,30 @@ package modules
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/filecoin-project/go-lotus/build"
|
||||
"github.com/filecoin-project/go-lotus/retrieval"
|
||||
"github.com/filecoin-project/go-lotus/storage/sector"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/ipfs/go-bitswap"
|
||||
"github.com/ipfs/go-bitswap/network"
|
||||
"github.com/libp2p/go-libp2p-core/routing"
|
||||
|
||||
"github.com/ipfs/go-blockservice"
|
||||
"github.com/ipfs/go-datastore"
|
||||
blockstore "github.com/ipfs/go-ipfs-blockstore"
|
||||
"github.com/ipfs/go-merkledag"
|
||||
"github.com/libp2p/go-libp2p-core/host"
|
||||
"github.com/libp2p/go-libp2p-core/routing"
|
||||
"github.com/mitchellh/go-homedir"
|
||||
"go.uber.org/fx"
|
||||
|
||||
"github.com/filecoin-project/go-lotus/api"
|
||||
"github.com/filecoin-project/go-lotus/build"
|
||||
"github.com/filecoin-project/go-lotus/chain/address"
|
||||
"github.com/filecoin-project/go-lotus/chain/deals"
|
||||
"github.com/filecoin-project/go-lotus/lib/sectorbuilder"
|
||||
"github.com/filecoin-project/go-lotus/node/modules/dtypes"
|
||||
"github.com/filecoin-project/go-lotus/node/modules/helpers"
|
||||
"github.com/filecoin-project/go-lotus/node/repo"
|
||||
"github.com/filecoin-project/go-lotus/retrieval"
|
||||
"github.com/filecoin-project/go-lotus/storage"
|
||||
"github.com/filecoin-project/go-lotus/storage/sector"
|
||||
)
|
||||
|
||||
func minerAddrFromDS(ds dtypes.MetadataDS) (address.Address, error) {
|
||||
|
@ -81,7 +81,7 @@ type handlerDeal struct {
|
||||
size uint64
|
||||
}
|
||||
|
||||
func (m *Miner) HandleDealStream(stream network.Stream) { // TODO: should we block in stream handlers
|
||||
func (m *Miner) HandleDealStream(stream network.Stream) {
|
||||
defer stream.Close()
|
||||
|
||||
hnd := &handlerDeal{
|
||||
|
@ -49,7 +49,7 @@ type QueryResponse struct {
|
||||
MinPrice types.BigInt
|
||||
}
|
||||
|
||||
type Unixfs0Offer struct {
|
||||
type Unixfs0Offer struct { // UNBORK
|
||||
Root cid.Cid
|
||||
Offset uint64
|
||||
Size uint64
|
||||
|
Loading…
Reference in New Issue
Block a user