mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 03:16:45 +01:00
Merge pull request #371 from hermeznetwork/feature/fixpanic1
Fix panic caused by nil batchInfo.ServerProof
This commit is contained in:
@@ -698,9 +698,12 @@ func (p *Pipeline) Start(batchNum common.BatchNum, lastForgeL1TxsNum int64,
|
|||||||
continue
|
continue
|
||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
log.Errorw("proversPool.Get", "err", err)
|
log.Errorw("proversPool.Get", "err", err)
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
if err := p.sendServerProof(p.ctx, serverProof, batchInfo); err != nil {
|
batchInfo.ServerProof = serverProof
|
||||||
|
if err := p.sendServerProof(p.ctx, batchInfo); err != nil {
|
||||||
log.Errorw("sendServerProof", "err", err)
|
log.Errorw("sendServerProof", "err", err)
|
||||||
|
batchInfo.ServerProof = nil
|
||||||
p.proversPool.Add(serverProof)
|
p.proversPool.Add(serverProof)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@@ -762,8 +765,7 @@ func l2TxsIDs(txs []common.PoolL2Tx) []common.TxID {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// sendServerProof sends the circuit inputs to the proof server
|
// sendServerProof sends the circuit inputs to the proof server
|
||||||
func (p *Pipeline) sendServerProof(ctx context.Context, serverProof prover.Client,
|
func (p *Pipeline) sendServerProof(ctx context.Context, batchInfo *BatchInfo) error {
|
||||||
batchInfo *BatchInfo) error {
|
|
||||||
p.cfg.debugBatchStore(batchInfo)
|
p.cfg.debugBatchStore(batchInfo)
|
||||||
|
|
||||||
// 7. Call the selected idle server proof with BatchBuilder output,
|
// 7. Call the selected idle server proof with BatchBuilder output,
|
||||||
|
|||||||
Reference in New Issue
Block a user