Skip to content

Commit e3bfb5f

Browse files
authored
fix: treat JSON errors as CCC error (#922)
1 parent df3713e commit e3bfb5f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

rollup/pipeline/pipeline.go

+6-2
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ func (p *Pipeline) encodeStage(traces <-chan *BlockCandidate) <-chan *BlockCandi
362362
trace.RustTrace = circuitcapacitychecker.MakeRustTrace(trace.LastTrace, buffer)
363363
if trace.RustTrace == nil {
364364
log.Error("making rust trace", "txHash", trace.LastTrace.Transactions[0].TxHash)
365-
return
365+
// ignore the error here, CCC stage will catch it and treat it as a CCC error
366366
}
367367
}
368368
encodeTimer.UpdateSince(encodeStart)
@@ -431,7 +431,11 @@ func (p *Pipeline) cccStage(candidates <-chan *BlockCandidate, deadline time.Tim
431431
var accRows *types.RowConsumption
432432
var err error
433433
if candidate != nil && p.ccc != nil {
434-
accRows, err = p.ccc.ApplyTransactionRustTrace(candidate.RustTrace)
434+
if candidate.RustTrace != nil {
435+
accRows, err = p.ccc.ApplyTransactionRustTrace(candidate.RustTrace)
436+
} else {
437+
err = errors.New("no rust trace")
438+
}
435439
lastTxn := candidate.Txs[candidate.Txs.Len()-1]
436440
cccTimer.UpdateSince(cccStart)
437441
if err != nil {

0 commit comments

Comments
 (0)