Address review
This commit is contained in:
parent
1e5e69ec9d
commit
4682e72cf4
@ -935,9 +935,14 @@ func (sb *Sealer) GenerateWinningPoStWithVanilla(ctx context.Context, proofType
|
|||||||
|
|
||||||
func (sb *Sealer) GenerateWindowPoStWithVanilla(ctx context.Context, proofType abi.RegisteredPoStProof, minerID abi.ActorID, randomness abi.PoStRandomness, proofs [][]byte, partitionIdx int) (proof5.PoStProof, error) {
|
func (sb *Sealer) GenerateWindowPoStWithVanilla(ctx context.Context, proofType abi.RegisteredPoStProof, minerID abi.ActorID, randomness abi.PoStRandomness, proofs [][]byte, partitionIdx int) (proof5.PoStProof, error) {
|
||||||
pp, err := ffi.GenerateSinglePartitionWindowPoStWithVanilla(proofType, minerID, randomness, proofs, uint(partitionIdx))
|
pp, err := ffi.GenerateSinglePartitionWindowPoStWithVanilla(proofType, minerID, randomness, proofs, uint(partitionIdx))
|
||||||
if err != nil || pp == nil {
|
if err != nil {
|
||||||
return proof5.PoStProof{}, err
|
return proof5.PoStProof{}, err
|
||||||
}
|
}
|
||||||
|
if pp == nil {
|
||||||
|
// should be impossible, but just in case do not panic
|
||||||
|
return proof5.PoStProof{}, xerrors.New("postproof was nil")
|
||||||
|
}
|
||||||
|
|
||||||
return proof5.PoStProof{
|
return proof5.PoStProof{
|
||||||
PoStProof: pp.PoStProof,
|
PoStProof: pp.PoStProof,
|
||||||
ProofBytes: pp.ProofBytes,
|
ProofBytes: pp.ProofBytes,
|
||||||
|
2
extern/sector-storage/manager_post.go
vendored
2
extern/sector-storage/manager_post.go
vendored
@ -111,7 +111,7 @@ func (m *Manager) generateWindowPoSt(ctx context.Context, minerID abi.ActorID, s
|
|||||||
// ceil(sectorInfos / maxPartitionSize)
|
// ceil(sectorInfos / maxPartitionSize)
|
||||||
partitionCount := uint64((len(sectorInfo) + int(maxPartitionSize) - 1) / int(maxPartitionSize))
|
partitionCount := uint64((len(sectorInfo) + int(maxPartitionSize) - 1) / int(maxPartitionSize))
|
||||||
|
|
||||||
log.Infof("generateWindowPoSt maxPartitionSize:%d partitionCount:%d \n", maxPartitionSize, partitionCount)
|
log.Infof("generateWindowPoSt maxPartitionSize:%d partitionCount:%d", maxPartitionSize, partitionCount)
|
||||||
|
|
||||||
var skipped []abi.SectorID
|
var skipped []abi.SectorID
|
||||||
var flk sync.Mutex
|
var flk sync.Mutex
|
||||||
|
Loading…
Reference in New Issue
Block a user