lotus/storage/sealer/ffiwrapper/sealer.go

32 lines
678 B
Go
Raw Normal View History

2020-03-26 02:50:56 +00:00
package ffiwrapper
import (
"context"
2023-08-18 15:13:57 +00:00
"github.com/ipfs/go-cid"
2020-03-26 02:50:56 +00:00
logging "github.com/ipfs/go-log/v2"
2023-08-18 15:13:57 +00:00
"github.com/filecoin-project/lotus/storage/sealer/storiface"
2020-03-26 02:50:56 +00:00
)
var log = logging.Logger("ffiwrapper")
type ExternPrecommit2 func(ctx context.Context, sector storiface.SectorRef, cache, sealed string, pc1out storiface.PreCommit1Out) (sealedCID cid.Cid, unsealedCID cid.Cid, err error)
type ExternalSealer struct {
PreCommit2 ExternPrecommit2
}
2020-03-26 19:34:38 +00:00
type Sealer struct {
sectors SectorProvider
// externCalls cointain overrides for calling alternative sealing logic
externCalls ExternalSealer
2020-03-26 02:50:56 +00:00
stopping chan struct{}
}
2020-03-26 19:34:38 +00:00
func (sb *Sealer) Stop() {
2020-03-26 02:50:56 +00:00
close(sb.stopping)
}