feat: add verified-deal flag to lotus client deal

This commit is contained in:
Dirk McCormick 2020-06-30 17:17:21 -04:00 committed by Łukasz Magiera
parent f48681a61d
commit 46f07faead
3 changed files with 8 additions and 1 deletions

View File

@ -437,6 +437,7 @@ type StartDealParams struct {
EpochPrice types.BigInt EpochPrice types.BigInt
MinBlocksDuration uint64 MinBlocksDuration uint64
DealStartEpoch abi.ChainEpoch DealStartEpoch abi.ChainEpoch
VerifiedDeal bool
} }
type IpldObject struct { type IpldObject struct {

View File

@ -232,6 +232,11 @@ var clientDealCmd = &cli.Command{
Usage: "specify the epoch that the deal should start at", Usage: "specify the epoch that the deal should start at",
Value: -1, Value: -1,
}, },
&cli.BoolFlag{
Name: "verified-deal",
Usage: "indicate that the deal counts towards verified client total",
Value: true,
},
&CidBaseFlag, &CidBaseFlag,
}, },
Action: func(cctx *cli.Context) error { Action: func(cctx *cli.Context) error {
@ -313,6 +318,7 @@ var clientDealCmd = &cli.Command{
EpochPrice: types.BigInt(price), EpochPrice: types.BigInt(price),
MinBlocksDuration: uint64(dur), MinBlocksDuration: uint64(dur),
DealStartEpoch: abi.ChainEpoch(cctx.Int64("start-epoch")), DealStartEpoch: abi.ChainEpoch(cctx.Int64("start-epoch")),
VerifiedDeal: cctx.Bool("verified-deal"),
}) })
if err != nil { if err != nil {
return err return err

View File

@ -137,7 +137,7 @@ func (a *API) ClientStartDeal(ctx context.Context, params *api.StartDealParams)
big.Zero(), big.Zero(),
rt, rt,
false, false,
false, params.VerifiedDeal,
) )
if err != nil { if err != nil {