Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DealID to DealInfo #1392

Merged
merged 1 commit into from
Mar 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions api/api_full.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -168,6 +169,8 @@ type DealInfo struct {

PricePerEpoch types.BigInt
Duration uint64

DealID uint64
}

type MsgWait struct {
Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 3 additions & 1 deletion node/impl/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}

Expand All @@ -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,
Expand All @@ -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
}

Expand Down