Mise à jour effectuée, merci de nous signaler tout dysfonctionnement ! | Upgrade done, please let us know about any dysfunction!

Commit 0b3f4e3f authored by Cédric Moreau's avatar Cédric Moreau Committed by Éloïs
Browse files

Revert "[fix] #1256force sync for cancelWork job"

This reverts commit 9871890e.
parent 7b597352
......@@ -67,8 +67,8 @@ export class WorkerFarm {
/**
* Eventually stops the engine PoW if one was computing
*/
async stopPoW() {
this.stopPromise = querablep(Promise.resolve(this.theEngine.cancel()))
stopPoW() {
this.stopPromise = querablep(this.theEngine.cancel())
return this.stopPromise;
}
......@@ -133,10 +133,10 @@ export class BlockProver {
if (this.workerFarmPromise) {
let farm = await this.getWorker();
if (farm.isComputing() && !farm.isStopping()) {
Promise.resolve(farm.stopPoW())
await farm.stopPoW()
} else {
// We force the stop anyway, just to be sure
Promise.resolve(farm.stopPoW())
await farm.stopPoW()
}
if (this.waitResolve) {
this.waitResolve();
......
......@@ -33,11 +33,11 @@ export class PowEngine {
}
async prove(stuff:any) {
Promise.all([this.cluster.cancelWork()])
this.cluster.cancelWork()
return await this.cluster.proveByWorkers(stuff)
}
async cancel() {
cancel() {
return this.cluster.cancelWork()
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment