Skip to content

Commit

Permalink
fix state tree version in v2 upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
Stebalien committed Oct 7, 2020
1 parent f60a9a8 commit 2ab8dbb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions chain/actors/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
type Version int

const (
Version0 = 0
Version2 = 2
Version0 Version = 0
Version2 Version = 2
)

// Converts a network version into an actors adt version.
Expand Down
4 changes: 1 addition & 3 deletions chain/stmgr/forks.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (
states2 "github.com/filecoin-project/specs-actors/v2/actors/states"

"github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/chain/actors"
"github.com/filecoin-project/lotus/chain/actors/adt"
init_ "github.com/filecoin-project/lotus/chain/actors/builtin/init"
"github.com/filecoin-project/lotus/chain/actors/builtin/multisig"
Expand Down Expand Up @@ -518,8 +517,7 @@ func UpgradeActorsV2(ctx context.Context, sm *StateManager, cb ExecCallback, roo
}

newRoot, err := store.Put(ctx, &types.StateRoot{
// TODO: ActorUpgrade: should be state-tree specific, not just the actors version.
Version: actors.Version2,
Version: types.StateTreeVersion1,
Actors: newHamtRoot,
Info: info,
})
Expand Down

0 comments on commit 2ab8dbb

Please sign in to comment.