2020-03-26 02:50:56 +00:00
|
|
|
package ffiwrapper
|
|
|
|
|
|
|
|
import (
|
2020-09-07 03:49:10 +00:00
|
|
|
"github.com/filecoin-project/go-state-types/abi"
|
2020-03-26 02:50:56 +00:00
|
|
|
logging "github.com/ipfs/go-log/v2"
|
|
|
|
)
|
|
|
|
|
|
|
|
var log = logging.Logger("ffiwrapper")
|
|
|
|
|
2020-03-26 19:34:38 +00:00
|
|
|
type Sealer struct {
|
2020-06-15 12:32:17 +00:00
|
|
|
sealProofType abi.RegisteredSealProof
|
2020-03-26 02:50:56 +00:00
|
|
|
ssize abi.SectorSize // a function of sealProofType and postProofType
|
|
|
|
|
|
|
|
sectors SectorProvider
|
|
|
|
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)
|
|
|
|
}
|
|
|
|
|
2020-03-26 19:34:38 +00:00
|
|
|
func (sb *Sealer) SectorSize() abi.SectorSize {
|
2020-03-26 02:50:56 +00:00
|
|
|
return sb.ssize
|
|
|
|
}
|
|
|
|
|
2020-06-15 12:32:17 +00:00
|
|
|
func (sb *Sealer) SealProofType() abi.RegisteredSealProof {
|
2020-03-26 02:50:56 +00:00
|
|
|
return sb.sealProofType
|
|
|
|
}
|