Add in two missing error checks

This commit is contained in:
Ian Davis 2022-11-25 11:43:26 +00:00
parent 6770cc69d5
commit e4fe47d598
2 changed files with 11 additions and 3 deletions

View File

@ -239,8 +239,10 @@ func checkMigrationInvariants(ctx context.Context, v8StateRootCid cid.Cid, v9Sta
if err != nil {
return err
}
v9actorTree, _ := builtin.LoadTree(actorStore, v9stateRoot.Actors)
v9actorTree, err := builtin.LoadTree(actorStore, v9stateRoot.Actors)
if err != nil {
return err
}
messages, err := v9.CheckStateInvariants(v9actorTree, epoch, actorCodeCids)
if err != nil {
return xerrors.Errorf("checking state invariants: %w", err)

View File

@ -151,7 +151,13 @@ func NewConsensus(host host.Host, cfg *ClusterRaftConfig, mpool *messagepool.Mes
consensus.SetActor(actor)
peers := []peer.ID{}
addrInfos, _ := addrutil.ParseAddresses(ctx, cfg.InitPeerset)
addrInfos, err := addrutil.ParseAddresses(ctx, cfg.InitPeerset)
if err != nil {
logger.Error("error parsing addresses: ", err)
cancel()
return nil, err
}
for _, addrInfo := range addrInfos {
peers = append(peers, addrInfo.ID)