Merge pull request #6096 from Reskorey/master

fix full node painc
This commit is contained in:
Łukasz Magiera 2021-04-23 12:08:30 +02:00 committed by GitHub
commit e5d8ae7a9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -600,6 +600,11 @@ func (a *API) clientRetrieve(ctx context.Context, order api.RetrievalOrder, ref
}
}
if order.Total.Int == nil {
finish(xerrors.Errorf("cannot make retrieval deal for null total"))
return
}
if order.Size == 0 {
finish(xerrors.Errorf("cannot make retrieval deal for zero bytes"))
return