Merge pull request #1392 from jsign/jsign/addDealId

Add DealID to DealInfo
This commit is contained in:
Whyrusleeping
2020-03-10 18:45:07 -07:00
committed by GitHub
2 changed files with 10 additions and 5 deletions
+7 -4
View File
@@ -2,9 +2,10 @@ package api
import (
"context"
"github.com/filecoin-project/lotus/chain/vm"
"time"
"github.com/filecoin-project/lotus/chain/vm"
"github.com/filecoin-project/go-address"
"github.com/ipfs/go-cid"
"github.com/ipfs/go-filestore"
@@ -168,6 +169,8 @@ type DealInfo struct {
PricePerEpoch types.BigInt
Duration uint64
DealID uint64
}
type MsgWait struct {
@@ -273,10 +276,10 @@ type RetrievalOrder struct {
}
type InvocResult struct {
Msg *types.Message
MsgRct *types.MessageReceipt
Msg *types.Message
MsgRct *types.MessageReceipt
InternalExecutions []*vm.ExecutionResult
Error string
Error string
}
type ActiveSync struct {
+3 -1
View File
@@ -110,6 +110,8 @@ func (a *API) ClientListDeals(ctx context.Context) ([]api.DealInfo, error) {
PricePerEpoch: utils.FromSharedTokenAmount(v.Proposal.StoragePricePerEpoch),
Duration: v.Proposal.Duration,
DealID: v.DealID,
}
}
@@ -121,7 +123,6 @@ func (a *API) ClientGetDealInfo(ctx context.Context, d cid.Cid) (*api.DealInfo,
if err != nil {
return nil, err
}
return &api.DealInfo{
ProposalCid: v.ProposalCid,
State: v.State,
@@ -130,6 +131,7 @@ func (a *API) ClientGetDealInfo(ctx context.Context, d cid.Cid) (*api.DealInfo,
Size: v.Proposal.PieceSize,
PricePerEpoch: utils.FromSharedTokenAmount(v.Proposal.StoragePricePerEpoch),
Duration: v.Proposal.Duration,
DealID: v.DealID,
}, nil
}