use new channelmonitor.Config
This commit is contained in:
@@ -7,7 +7,6 @@ import (
|
||||
"io"
|
||||
"os"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/filecoin-project/lotus/chain/actors/builtin/miner"
|
||||
|
||||
"golang.org/x/xerrors"
|
||||
@@ -216,8 +215,6 @@ func (a *API) ClientListDeals(ctx context.Context) ([]api.DealInfo, error) {
|
||||
out[k] = a.newDealInfoWithTransfer(transferCh, v)
|
||||
}
|
||||
|
||||
spew.Dump(out)
|
||||
|
||||
return out, nil
|
||||
}
|
||||
|
||||
|
||||
+12
-2
@@ -13,6 +13,7 @@ import (
|
||||
|
||||
"go.uber.org/fx"
|
||||
|
||||
"github.com/filecoin-project/go-data-transfer/channelmonitor"
|
||||
dtimpl "github.com/filecoin-project/go-data-transfer/impl"
|
||||
dtnet "github.com/filecoin-project/go-data-transfer/network"
|
||||
dtgstransport "github.com/filecoin-project/go-data-transfer/transport/graphsync"
|
||||
@@ -136,8 +137,17 @@ func NewClientGraphsyncDataTransfer(lc fx.Lifecycle, h host.Host, gs dtypes.Grap
|
||||
}
|
||||
|
||||
// data-transfer push channel restart configuration
|
||||
dtRestartConfig := dtimpl.PushChannelRestartConfig(time.Minute, 10, 1024, 10*time.Minute, 3)
|
||||
dt, err := dtimpl.NewDataTransfer(dtDs, filepath.Join(r.Path(), "data-transfer"), net, transport, sc, dtRestartConfig)
|
||||
dtRestartConf := dtimpl.ChannelRestartConfig(channelmonitor.Config{
|
||||
AcceptTimeout: 100 * time.Millisecond,
|
||||
Interval: 100 * time.Millisecond,
|
||||
MinBytesTransferred: 1,
|
||||
ChecksPerInterval: 10,
|
||||
RestartBackoff: 500 * time.Millisecond,
|
||||
MaxConsecutiveRestarts: 5,
|
||||
CompleteTimeout: 100 * time.Millisecond,
|
||||
})
|
||||
//dtRestartConfig := dtimpl.PushChannelRestartConfig(time.Minute, 10, 1024, 10*time.Minute, 3)
|
||||
dt, err := dtimpl.NewDataTransfer(dtDs, filepath.Join(r.Path(), "data-transfer"), net, transport, sc, dtRestartConf)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user