Merge pull request #9706 from filecoin-project/gstuart/datacap-for-each-check

fix: Add missing check in datacap for-each
This commit is contained in:
Łukasz Magiera 2022-11-23 16:56:43 +01:00 committed by GitHub
commit 0a555eda90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,6 +54,9 @@ func forEachClient(store adt.Store, ver actors.Version, root rootFunc, cb func(a
} }
a, err := address.NewIDAddress(id) a, err := address.NewIDAddress(id)
if err != nil {
return xerrors.Errorf("creating ID address from actor ID: %w", err)
}
return cb(a, big.Div(dcap, verifreg.DataCapGranularity)) return cb(a, big.Div(dcap, verifreg.DataCapGranularity))
}) })