fix state tree version in v2 upgrade

This commit is contained in:
Steven Allen 2020-10-06 17:51:43 -07:00
parent c17fa4bc35
commit cca17f6078
2 changed files with 3 additions and 5 deletions

View File

@ -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.

View File

@ -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"
@ -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,
})