Skip to content

Commit

Permalink
Add more post-migration sanity checks
Browse files Browse the repository at this point in the history
  • Loading branch information
arajasek committed Aug 14, 2023
1 parent fa0e512 commit e69b1be
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions itests/migration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import (
"testing"
"time"

"github.com/filecoin-project/lotus/chain/actors/builtin/system"

"github.com/stretchr/testify/require"

"github.com/filecoin-project/go-address"
Expand Down Expand Up @@ -801,6 +803,25 @@ func TestMigrationNV21(t *testing.T) {

require.Equal(t, types.StateTreeVersion5, newStateTree.Version())

// check the system actor
systemAct, err := newStateTree.GetActor(builtin.SystemActorAddr)
require.NoError(t, err)

systemCode, ok := actors.GetActorCodeID(actorstypes.Version12, manifest.SystemKey)
require.True(t, ok)

require.Equal(t, systemCode, systemAct.Code)

systemSt, err := system.Load(ctxStore, systemAct)
require.NoError(t, err)

manifest12Cid, ok := actors.GetManifest(actorstypes.Version12)
require.True(t, ok)

manifest12, err := actors.LoadManifest(ctx, manifest12Cid, ctxStore)
require.NoError(t, err)
require.Equal(t, manifest12.Data, systemSt.GetBuiltinActors())

// start post migration checks

//todo @aayush sector info changes
Expand Down

0 comments on commit e69b1be

Please sign in to comment.