Skip to content

Commit

Permalink
stmgr: GetNtwkVersion: return genesis network version before the firs…
Browse files Browse the repository at this point in the history
…t upgrade
  • Loading branch information
arajasek committed Mar 25, 2022
1 parent 25b2e14 commit 0bfbcfb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion chain/stmgr/forks.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 0bfbcfb

Please sign in to comment.