From 07df6e010fba95abbe6201fe76756ace6b2a91e1 Mon Sep 17 00:00:00 2001 From: Ignacio Hagopian Date: Tue, 10 Mar 2020 21:48:55 -0300 Subject: [PATCH] add dealID in DealInfo Signed-off-by: Ignacio Hagopian --- api/api_full.go | 11 +++++++---- node/impl/client/client.go | 4 +++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/api/api_full.go b/api/api_full.go index 62e47fe1e62..379737ad5bb 100644 --- a/api/api_full.go +++ b/api/api_full.go @@ -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 { diff --git a/node/impl/client/client.go b/node/impl/client/client.go index 3c4b7f438b5..06b0e0480f8 100644 --- a/node/impl/client/client.go +++ b/node/impl/client/client.go @@ -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 }