From 1eab54deb024baa1e5c46a725153172ed289b9f8 Mon Sep 17 00:00:00 2001 From: David Date: Fri, 22 Sep 2023 10:23:04 +0800 Subject: [PATCH] feat(prover): release capacity when the corresponding local proof generation is canceled (#402) --- prover/prover.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/prover/prover.go b/prover/prover.go index 452dd6b5f..031b8fcbf 100644 --- a/prover/prover.go +++ b/prover/prover.go @@ -862,6 +862,9 @@ func (p *Prover) cancelProof(ctx context.Context, blockID uint64) { if cancel, ok := p.currentBlocksBeingProven[blockID]; ok { cancel() delete(p.currentBlocksBeingProven, blockID) + if !p.cfg.OracleProver { + p.capacityManager.ReleaseOneCapacity() + } } }