Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
duniter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nodes
typescript
duniter
Commits
4acfe365
Commit
4acfe365
authored
7 years ago
by
Cédric Moreau
Browse files
Options
Downloads
Patches
Plain Diff
Revert "[fix] #1256force sync for cancelWork job"
This reverts commit
9871890e
.
parent
9871890e
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!1238
Resolve "the 1.6.15 and 1.6.16 versions never starts the calculation of blocks"
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/modules/prover/lib/blockProver.ts
+4
-4
4 additions, 4 deletions
app/modules/prover/lib/blockProver.ts
app/modules/prover/lib/engine.ts
+2
-2
2 additions, 2 deletions
app/modules/prover/lib/engine.ts
with
6 additions
and
6 deletions
app/modules/prover/lib/blockProver.ts
+
4
−
4
View file @
4acfe365
...
@@ -67,8 +67,8 @@ export class WorkerFarm {
...
@@ -67,8 +67,8 @@ export class WorkerFarm {
/**
/**
* Eventually stops the engine PoW if one was computing
* Eventually stops the engine PoW if one was computing
*/
*/
async
stopPoW
()
{
stopPoW
()
{
this
.
stopPromise
=
querablep
(
Promise
.
resolve
(
this
.
theEngine
.
cancel
())
)
this
.
stopPromise
=
querablep
(
this
.
theEngine
.
cancel
())
return
this
.
stopPromise
;
return
this
.
stopPromise
;
}
}
...
@@ -133,10 +133,10 @@ export class BlockProver {
...
@@ -133,10 +133,10 @@ export class BlockProver {
if
(
this
.
workerFarmPromise
)
{
if
(
this
.
workerFarmPromise
)
{
let
farm
=
await
this
.
getWorker
();
let
farm
=
await
this
.
getWorker
();
if
(
farm
.
isComputing
()
&&
!
farm
.
isStopping
())
{
if
(
farm
.
isComputing
()
&&
!
farm
.
isStopping
())
{
Promise
.
resolve
(
farm
.
stopPoW
()
)
await
farm
.
stopPoW
()
}
else
{
}
else
{
// We force the stop anyway, just to be sure
// We force the stop anyway, just to be sure
Promise
.
resolve
(
farm
.
stopPoW
()
)
await
farm
.
stopPoW
()
}
}
if
(
this
.
waitResolve
)
{
if
(
this
.
waitResolve
)
{
this
.
waitResolve
();
this
.
waitResolve
();
...
...
This diff is collapsed.
Click to expand it.
app/modules/prover/lib/engine.ts
+
2
−
2
View file @
4acfe365
...
@@ -33,11 +33,11 @@ export class PowEngine {
...
@@ -33,11 +33,11 @@ export class PowEngine {
}
}
async
prove
(
stuff
:
any
)
{
async
prove
(
stuff
:
any
)
{
Promise
.
all
([
this
.
cluster
.
cancelWork
()
])
this
.
cluster
.
cancelWork
()
return
await
this
.
cluster
.
proveByWorkers
(
stuff
)
return
await
this
.
cluster
.
proveByWorkers
(
stuff
)
}
}
async
cancel
()
{
cancel
()
{
return
this
.
cluster
.
cancelWork
()
return
this
.
cluster
.
cancelWork
()
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment