wire in prove

This commit is contained in:
Jaremy Creechley 2024-05-17 00:59:00 +03:00
parent 0dfa2cc488
commit 1e86b5c051
No known key found for this signature in database
GPG Key ID: 4E66FB67B21D3300
2 changed files with 6 additions and 4 deletions

View File

@ -1,4 +1,4 @@
import std/sequtils
import std/options
import pkg/taskpools
import pkg/taskpools/flowvars
@ -26,14 +26,17 @@ type
signal: ThreadSignalPtr
params: CircomCompatParams
var circomBackend {.threadvar.}: CircomCompat
var circomBackend {.threadvar.}: Option[CircomCompat]
proc proveTask[H](
args: ProveTaskArgs, data: ProofInputs[H]
): Result[CircomProof, string] =
try:
let res = circomBackend.prove(data)
if circomBackend.isNone:
circomBackend = some CircomCompat.init(args.params)
let res = circomBackend.get().prove(data)
if res.isOk:
return ok(res.get())
else:

View File

@ -99,7 +99,6 @@ proc new*(
backend: AnyBackend,
nSamples: int
): Prover =
Prover(
backend: backend,
store: store,