Merge pull request #380 from filecoin-project/fix/storage-miner-init-fail

check return code of create storage miner call
This commit is contained in:
Łukasz Magiera 2019-10-16 14:12:09 +02:00 committed by GitHub
commit c00d25dd37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -309,6 +309,10 @@ func createStorageMiner(ctx context.Context, api api.FullNode, peerid peer.ID, c
return address.Undef, err
}
if mw.Receipt.ExitCode != 0 {
return address.Undef, xerrors.Errorf("create storage miner failed: exit code %d", mw.Receipt.ExitCode)
}
addr, err = address.NewFromBytes(mw.Receipt.Return)
if err != nil {
return address.Undef, err