sealing: pc batch: Call PreCommitSectorBatch2
This commit is contained in:
parent
c1304dee25
commit
7db6f31cca
@ -321,13 +321,13 @@ func (b *PreCommitBatcher) processSingle(cfg sealiface.Config, mi api.MinerInfo,
|
||||
}
|
||||
|
||||
func (b *PreCommitBatcher) processPreCommitBatch(cfg sealiface.Config, bf abi.TokenAmount, entries []*preCommitEntry, nv network.Version) ([]sealiface.PreCommitBatchRes, error) {
|
||||
params := miner.PreCommitSectorBatchParams{}
|
||||
params := miner.PreCommitSectorBatchParams2{}
|
||||
deposit := big.Zero()
|
||||
var res sealiface.PreCommitBatchRes
|
||||
|
||||
for _, p := range entries {
|
||||
res.Sectors = append(res.Sectors, p.pci.SectorNumber)
|
||||
params.Sectors = append(params.Sectors, *infoToPreCommitSectorParams(p.pci))
|
||||
params.Sectors = append(params.Sectors, *p.pci)
|
||||
deposit = big.Add(deposit, p.deposit)
|
||||
}
|
||||
|
||||
@ -367,7 +367,7 @@ func (b *PreCommitBatcher) processPreCommitBatch(cfg sealiface.Config, bf abi.To
|
||||
return []sealiface.PreCommitBatchRes{res}, xerrors.Errorf("no good address found: %w", err)
|
||||
}
|
||||
|
||||
_, err = simulateMsgGas(b.mctx, b.api, from, b.maddr, builtin.MethodsMiner.PreCommitSectorBatch, needFunds, maxFee, enc.Bytes())
|
||||
_, err = simulateMsgGas(b.mctx, b.api, from, b.maddr, builtin.MethodsMiner.PreCommitSectorBatch2, needFunds, maxFee, enc.Bytes())
|
||||
|
||||
if err != nil && (!api.ErrorIsIn(err, []error{&api.ErrOutOfGas{}}) || len(entries) == 1) {
|
||||
res.Error = err.Error()
|
||||
@ -385,7 +385,7 @@ func (b *PreCommitBatcher) processPreCommitBatch(cfg sealiface.Config, bf abi.To
|
||||
}
|
||||
|
||||
// If state call succeeds, we can send the message for real
|
||||
mcid, err := sendMsg(b.mctx, b.api, from, b.maddr, builtin.MethodsMiner.PreCommitSectorBatch, needFunds, maxFee, enc.Bytes())
|
||||
mcid, err := sendMsg(b.mctx, b.api, from, b.maddr, builtin.MethodsMiner.PreCommitSectorBatch2, needFunds, maxFee, enc.Bytes())
|
||||
if err != nil {
|
||||
res.Error = err.Error()
|
||||
return []sealiface.PreCommitBatchRes{res}, xerrors.Errorf("pushing message to mpool: %w", err)
|
||||
|
Loading…
Reference in New Issue
Block a user