2020-04-06 18:07:26 +00:00
|
|
|
package sealing
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
2020-09-07 03:49:10 +00:00
|
|
|
"github.com/filecoin-project/go-state-types/abi"
|
2022-06-16 09:12:33 +00:00
|
|
|
|
|
|
|
"github.com/filecoin-project/lotus/chain/types"
|
2020-04-06 18:07:26 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// `curH`-`ts.Height` = `confidence`
|
2022-06-16 09:12:33 +00:00
|
|
|
type HeightHandler func(ctx context.Context, tok types.TipSetKey, curH abi.ChainEpoch) error
|
|
|
|
type RevertHandler func(ctx context.Context, tok types.TipSetKey) error
|
2020-04-06 18:07:26 +00:00
|
|
|
|
|
|
|
type Events interface {
|
|
|
|
ChainAt(hnd HeightHandler, rev RevertHandler, confidence int, h abi.ChainEpoch) error
|
|
|
|
}
|