lotus/storage/sealer/ffiwrapper/sealer.go

30 lines
676 B
Go
Raw Normal View History

2020-03-26 02:50:56 +00:00
package ffiwrapper
import (
"context"
"github.com/filecoin-project/lotus/storage/sealer/storiface"
"github.com/ipfs/go-cid"
2020-03-26 02:50:56 +00:00
logging "github.com/ipfs/go-log/v2"
)
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)
}