From ce16ac59390c69c90119d331afa0f53d03d55524 Mon Sep 17 00:00:00 2001 From: zenground0 Date: Mon, 24 Jun 2024 16:46:28 -0600 Subject: [PATCH] Get it working --- go.sum | 2 -- itests/migration_test.go | 19 ++++++++++--------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/go.sum b/go.sum index 9d9f0c5312d..543fc226e93 100644 --- a/go.sum +++ b/go.sum @@ -292,8 +292,6 @@ github.com/filecoin-project/go-state-types v0.1.0/go.mod h1:ezYnPf0bNkTsDibL/psS github.com/filecoin-project/go-state-types v0.1.6/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.1.10/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.13.1/go.mod h1:cHpOPup9H1g2T29dKHAjC2sc7/Ef5ypjuW9A3I+e9yY= -github.com/filecoin-project/go-state-types v0.14.0-dev h1:bDwq1S28D7EC/uDmKU8vvNcdFw/YDsNq09pe3zeV5h4= -github.com/filecoin-project/go-state-types v0.14.0-dev/go.mod h1:cHpOPup9H1g2T29dKHAjC2sc7/Ef5ypjuW9A3I+e9yY= github.com/filecoin-project/go-state-types v0.14.0-rc2 h1:jx+iOyy7un1G6ozkvKpIBVFhs6Rg23j6NAoiIjBmGTc= github.com/filecoin-project/go-state-types v0.14.0-rc2/go.mod h1:cHpOPup9H1g2T29dKHAjC2sc7/Ef5ypjuW9A3I+e9yY= github.com/filecoin-project/go-statemachine v1.0.3 h1:N07o6alys+V1tNoSTi4WuuoeNC4erS/6jE74+NsgQuk= diff --git a/itests/migration_test.go b/itests/migration_test.go index 688fbb926ac..18ef5d7a7b4 100644 --- a/itests/migration_test.go +++ b/itests/migration_test.go @@ -18,9 +18,11 @@ import ( miner11 "github.com/filecoin-project/go-state-types/builtin/v11/miner" power11 "github.com/filecoin-project/go-state-types/builtin/v11/power" adt11 "github.com/filecoin-project/go-state-types/builtin/v11/util/adt" + account "github.com/filecoin-project/go-state-types/builtin/v14/account" markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market" migration "github.com/filecoin-project/go-state-types/builtin/v9/migration/test" miner9 "github.com/filecoin-project/go-state-types/builtin/v9/miner" + verifregst "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" "github.com/filecoin-project/go-state-types/crypto" "github.com/filecoin-project/go-state-types/manifest" @@ -861,18 +863,17 @@ func TestMigrationNV23(t *testing.T) { require.NoError(t, err) root := preMigrationTs.Blocks()[0].ParentStateRoot - fmt.Printf("root hypothesis: %s \n", root) preStateTree, err := state.LoadStateTree(ctxStore, root) require.NoError(t, err) require.Equal(t, types.StateTreeVersion5, preStateTree.Version()) - // // Check f090 actor before migration + // Check f090 actor before migration - // msigCodeNv22, ok := actors.GetActorCodeID(actorstypes.Version13, manifest.MultisigKey) - // assert.True(t, ok) - // f090ActorPre, err := preStateTree.GetActor(f090Addr) - // require.NoError(t, err) - // require.True(t, f090ActorPre.Code.Equals(msigCodeNv22)) + msigCodeNv22, ok := actors.GetActorCodeID(actorstypes.Version13, manifest.MultisigKey) + assert.True(t, ok) + f090ActorPre, err := preStateTree.GetActor(f090Addr) + require.NoError(t, err) + require.True(t, f090ActorPre.Code.Equals(msigCodeNv22)) // Wait for the migration testClient.WaitTillChain(ctx, kit.HeightAtLeast(nv23epoch+1)) @@ -896,6 +897,6 @@ func TestMigrationNV23(t *testing.T) { require.True(t, f090ActorPost.Code.Equals(accountNV23)) f090StatePost, err := clientApi.StateReadState(ctx, f090Addr, types.EmptyTSK) require.NoError(t, err) - state := f090StatePost.State.(map[string]interface{}) - require.Equal(t, state["Address"], f090Addr) + state := f090StatePost.State.(*account.State) + require.Equal(t, state.Address, f090Addr) }