Skip to content

Commit 6509812

Browse files
only migrate if multisig (#281)
1 parent 930408f commit 6509812

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

builtin/v14/migration/top.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,23 @@ func MigrateStateTree(ctx context.Context, store cbor.IpldStore, newManifestCID
104104
return xerrors.Errorf("failed to construct f090 id addr: %w", err)
105105
}
106106
f090OldAct, found, err := actorsOut.GetActorV5(f090ID)
107+
107108
if err != nil {
108109
return xerrors.Errorf("failed to get old f090 actor: %w", err)
109110
}
111+
110112
if !found {
111113
return xerrors.Errorf("failed to find old f090 actor: %w", err)
112114
}
115+
116+
msigCodeCID, ok := newManifest.Get(manifest.MultisigKey)
117+
if !ok {
118+
return xerrors.Errorf("invalid manifest missing multisig code cid")
119+
}
120+
if f090OldAct.Code != msigCodeCID {
121+
return nil
122+
}
123+
113124
f090NewSt := account14.State{Address: f090ID} // State points to ID addr
114125
h, err := actors.Store.Put(ctx, &f090NewSt)
115126
if err != nil {

0 commit comments

Comments
 (0)