From 0bfbcfb5e9aba08154080d4150b20d600bb00339 Mon Sep 17 00:00:00 2001 From: Aayush Date: Fri, 25 Mar 2022 15:09:14 -0400 Subject: [PATCH] stmgr: GetNtwkVersion: return genesis network version before the first upgrade --- chain/stmgr/forks.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chain/stmgr/forks.go b/chain/stmgr/forks.go index a83ffdf7a..9aa3f7e53 100644 --- a/chain/stmgr/forks.go +++ b/chain/stmgr/forks.go @@ -8,6 +8,8 @@ import ( "sync" "time" + "github.com/filecoin-project/lotus/build" + "github.com/filecoin-project/specs-actors/v7/actors/migration/nv15" "github.com/ipfs/go-cid" @@ -161,7 +163,8 @@ func (us UpgradeSchedule) GetNtwkVersion(e abi.ChainEpoch) (network.Version, err return u.Network, nil } } - return network.Version0, xerrors.Errorf("Epoch %d has no defined network version", e) + + return build.GenesisNetworkVersion, nil } func (sm *StateManager) HandleStateForks(ctx context.Context, root cid.Cid, height abi.ChainEpoch, cb ExecMonitor, ts *types.TipSet) (cid.Cid, error) {