v1.27.0-a #10
@ -371,18 +371,20 @@ func (b *CommitBatcher) processBatchV2(cfg sealiface.Config, sectors []abi.Secto
|
|||||||
|
|
||||||
collateral = big.Add(collateral, sc)
|
collateral = big.Add(collateral, sc)
|
||||||
|
|
||||||
pieces := b.todo[sector].ActivationManifest.Pieces
|
manifest := b.todo[sector].ActivationManifest
|
||||||
precomitInfo, err := b.api.StateSectorPreCommitInfo(b.mctx, b.maddr, sector, ts.Key())
|
precomitInfo, err := b.api.StateSectorPreCommitInfo(b.mctx, b.maddr, sector, ts.Key())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
res.FailedSectors[sector] = err.Error()
|
res.FailedSectors[sector] = err.Error()
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
err = b.allocationCheck(pieces, precomitInfo, abi.ActorID(mid), ts)
|
if len(manifest.Pieces) > 0 {
|
||||||
|
err = b.allocationCheck(manifest.Pieces, precomitInfo, abi.ActorID(mid), ts)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
res.FailedSectors[sector] = err.Error()
|
res.FailedSectors[sector] = err.Error()
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
params.SectorActivations = append(params.SectorActivations, b.todo[sector].ActivationManifest)
|
params.SectorActivations = append(params.SectorActivations, b.todo[sector].ActivationManifest)
|
||||||
params.SectorProofs = append(params.SectorProofs, b.todo[sector].Proof)
|
params.SectorProofs = append(params.SectorProofs, b.todo[sector].Proof)
|
||||||
@ -925,6 +927,10 @@ func (b *CommitBatcher) aggregateProofType(nv network.Version) (abi.RegisteredAg
|
|||||||
func (b *CommitBatcher) allocationCheck(Pieces []miner.PieceActivationManifest, precomitInfo *miner.SectorPreCommitOnChainInfo, miner abi.ActorID, ts *types.TipSet) error {
|
func (b *CommitBatcher) allocationCheck(Pieces []miner.PieceActivationManifest, precomitInfo *miner.SectorPreCommitOnChainInfo, miner abi.ActorID, ts *types.TipSet) error {
|
||||||
for _, p := range Pieces {
|
for _, p := range Pieces {
|
||||||
p := p
|
p := p
|
||||||
|
// skip filler pieces
|
||||||
|
if p.VerifiedAllocationKey == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
addr, err := address.NewIDAddress(uint64(p.VerifiedAllocationKey.Client))
|
addr, err := address.NewIDAddress(uint64(p.VerifiedAllocationKey.Client))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user