Skip to content

Commit

Permalink
Merge pull request #4153 from filecoin-project/asr/verbose-verification
Browse files Browse the repository at this point in the history
Add verified status to api.DealInfo
  • Loading branch information
magik6k committed Oct 4, 2020
2 parents 0fee5da + 306dfaa commit e326977
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions api/api_full.go
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ type DealInfo struct {
DealID abi.DealID

CreationTime time.Time
Verified bool
}

type MsgLookup struct {
Expand Down
6 changes: 4 additions & 2 deletions documentation/en/api-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,8 @@ Response:
"PricePerEpoch": "0",
"Duration": 42,
"DealID": 5432,
"CreationTime": "0001-01-01T00:00:00Z"
"CreationTime": "0001-01-01T00:00:00Z",
"Verified": true
}
```

Expand Down Expand Up @@ -992,7 +993,8 @@ Response:
"PricePerEpoch": "0",
"Duration": 42,
"DealID": 5432,
"CreationTime": "0001-01-01T00:00:00Z"
"CreationTime": "0001-01-01T00:00:00Z",
"Verified": true
}
```

Expand Down
3 changes: 3 additions & 0 deletions node/impl/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ func (a *API) ClientListDeals(ctx context.Context) ([]api.DealInfo, error) {
Duration: uint64(v.Proposal.Duration()),
DealID: v.DealID,
CreationTime: v.CreationTime.Time(),
Verified: v.Proposal.VerifiedDeal,
}
}

Expand All @@ -223,6 +224,7 @@ func (a *API) ClientGetDealInfo(ctx context.Context, d cid.Cid) (*api.DealInfo,
Duration: uint64(v.Proposal.Duration()),
DealID: v.DealID,
CreationTime: v.CreationTime.Time(),
Verified: v.Proposal.VerifiedDeal,
}, nil
}

Expand Down Expand Up @@ -848,6 +850,7 @@ func newDealInfo(v storagemarket.ClientDeal) api.DealInfo {
Duration: uint64(v.Proposal.Duration()),
DealID: v.DealID,
CreationTime: v.CreationTime.Time(),
Verified: v.Proposal.VerifiedDeal,
}
}

Expand Down

0 comments on commit e326977

Please sign in to comment.