lotus/chain/stmgr/forks.go

26 lines
582 B
Go
Raw Normal View History

2019-12-19 18:46:30 +00:00
package stmgr
import (
"context"
"github.com/ipfs/go-cid"
"golang.org/x/xerrors"
2019-12-19 18:46:30 +00:00
"github.com/filecoin-project/lotus/build"
)
func (sm *StateManager) handleStateForks(ctx context.Context, pstate cid.Cid, height, parentH uint64) (_ cid.Cid, err error) {
for i := parentH; i < height; i++ {
switch i {
case build.ForkNoPowerEPSUpdates:
pstate, err = sm.forkNoPowerEPS(ctx, pstate)
if err != nil {
return cid.Undef, xerrors.Errorf("executing state fork in epoch %d: %w", i, err)
}
2019-12-20 07:29:56 +00:00
log.Infof("forkNoPowerEPS state: %s", pstate)
}
2019-12-19 18:46:30 +00:00
}
return pstate, nil
2019-12-19 18:46:30 +00:00
}