add dealID in DealInfo

Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
This commit is contained in:
Ignacio Hagopian 2020-03-10 21:48:55 -03:00
parent 697ab30304
commit 07df6e010f
No known key found for this signature in database
GPG Key ID: 4DC349E20B2AD1BE
2 changed files with 10 additions and 5 deletions

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 {

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
}