Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: show verifying commp state for offline deals
Browse files Browse the repository at this point in the history
dirkmc committed Apr 11, 2023
1 parent ac6f82e commit 9e2d75d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gql/resolver.go
Original file line number Diff line number Diff line change
@@ -528,12 +528,17 @@ func (dr *dealResolver) message(ctx context.Context, checkpoint dealcheckpoints.
switch checkpoint {
case dealcheckpoints.Accepted:
if dr.IsOffline {
if dr.ProviderDealState.InboundFilePath != "" {
return "Verifying Commp"
}
return "Awaiting Offline Data Import"
}

var pct uint64 = math.MaxUint64
if dr.ProviderDealState.Transfer.Size > 0 {
pct = (100 * dr.transferred) / dr.ProviderDealState.Transfer.Size
}

switch {
case dr.transferred == 0 && !dr.provider.IsTransferStalled(dr.DealUuid):
return "Transfer Queued"

0 comments on commit 9e2d75d

Please sign in to comment.