Fix panic caused by nil batchInfo.ServerProof
Eduard S eduard@iden3.io
Thu, 17 Dec 2020 13:50:04 +0100
1 files changed,
5 insertions(+),
3 deletions(-)
jump to
M
coordinator/coordinator.go
→
coordinator/coordinator.go
@@ -698,9 +698,12 @@ if common.IsErrDone(err) {
continue } else if err != nil { 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) + batchInfo.ServerProof = nil p.proversPool.Add(serverProof) continue }@@ -762,8 +765,7 @@ return txIDs
} // sendServerProof sends the circuit inputs to the proof server -func (p *Pipeline) sendServerProof(ctx context.Context, serverProof prover.Client, - batchInfo *BatchInfo) error { +func (p *Pipeline) sendServerProof(ctx context.Context, batchInfo *BatchInfo) error { p.cfg.debugBatchStore(batchInfo) // 7. Call the selected idle server proof with BatchBuilder output,