Skip to content

Commit

Permalink
only migrate if multisig (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
aarshkshah1992 authored Jun 27, 2024
1 parent 930408f commit 6509812
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions builtin/v14/migration/top.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,23 @@ func MigrateStateTree(ctx context.Context, store cbor.IpldStore, newManifestCID
return xerrors.Errorf("failed to construct f090 id addr: %w", err)
}
f090OldAct, found, err := actorsOut.GetActorV5(f090ID)

if err != nil {
return xerrors.Errorf("failed to get old f090 actor: %w", err)
}

if !found {
return xerrors.Errorf("failed to find old f090 actor: %w", err)
}

msigCodeCID, ok := newManifest.Get(manifest.MultisigKey)
if !ok {
return xerrors.Errorf("invalid manifest missing multisig code cid")
}
if f090OldAct.Code != msigCodeCID {
return nil
}

f090NewSt := account14.State{Address: f090ID} // State points to ID addr
h, err := actors.Store.Put(ctx, &f090NewSt)
if err != nil {
Expand Down

0 comments on commit 6509812

Please sign in to comment.