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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nodes
typescript
duniter
Commits
15eb7659
Commit
15eb7659
authored
8 years ago
by
Cédric Moreau
Browse files
Options
Downloads
Patches
Plain Diff
[fix] A PoW test often fail because it is too much random
parent
eb50cbe9
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/integration/continuous-proof.js
+2
-20
2 additions, 20 deletions
test/integration/continuous-proof.js
with
2 additions
and
20 deletions
test/integration/continuous-proof.js
+
2
−
20
View file @
15eb7659
...
@@ -18,8 +18,8 @@ const NB_CORES_FOR_COMPUTATION = 1 // For simple tests. Can be changed to test m
...
@@ -18,8 +18,8 @@ const NB_CORES_FOR_COMPUTATION = 1 // For simple tests. Can be changed to test m
const
s1
=
toolbox
.
server
({
const
s1
=
toolbox
.
server
({
cpu
:
1
,
cpu
:
1
,
nbCores
:
NB_CORES_FOR_COMPUTATION
,
nbCores
:
NB_CORES_FOR_COMPUTATION
,
powDelay
:
100
0
,
powDelay
:
100
,
powMin
:
32
,
powMin
:
1
,
pair
:
{
pair
:
{
pub
:
'
HgTTJLAQ5sqfknMq7yLPZbehtuLSsKj9CxWN7k8QvYJd
'
,
pub
:
'
HgTTJLAQ5sqfknMq7yLPZbehtuLSsKj9CxWN7k8QvYJd
'
,
sec
:
'
51w4fEShBk1jCMauWu4mLpmDVfHksKmWcygpxriqCEZizbtERA6de4STKRkQBpxmMUwsKXRjSzuQ8ECwmqN1u2DP
'
sec
:
'
51w4fEShBk1jCMauWu4mLpmDVfHksKmWcygpxriqCEZizbtERA6de4STKRkQBpxmMUwsKXRjSzuQ8ECwmqN1u2DP
'
...
@@ -96,24 +96,6 @@ describe("Continous proof-of-work", function() {
...
@@ -96,24 +96,6 @@ describe("Continous proof-of-work", function() {
s1
.
permaProver
.
should
.
have
.
property
(
'
loops
'
).
greaterThanOrEqual
(
8
);
s1
.
permaProver
.
should
.
have
.
property
(
'
loops
'
).
greaterThanOrEqual
(
8
);
}));
}));
it
(
'
testing a network
'
,
()
=>
co
(
function
*
()
{
const
res
=
yield
toolbox
.
simpleNetworkOf2NodesAnd2Users
({
nbCores
:
NB_CORES_FOR_COMPUTATION
,
powMin
:
32
}),
s2
=
res
.
s1
,
s3
=
res
.
s2
;
yield
s2
.
commit
();
s2
.
conf
.
cpu
=
0.2
;
s3
.
conf
.
cpu
=
0.7
;
yield
[
s2
.
until
(
'
block
'
,
5
),
s3
.
until
(
'
block
'
,
5
),
co
(
function
*
()
{
s2
.
startBlockComputation
();
s3
.
startBlockComputation
();
})
];
}));
it
(
'
testing proof-of-work during a block pulling
'
,
()
=>
co
(
function
*
()
{
it
(
'
testing proof-of-work during a block pulling
'
,
()
=>
co
(
function
*
()
{
const
res
=
yield
toolbox
.
simpleNetworkOf2NodesAnd2Users
({
const
res
=
yield
toolbox
.
simpleNetworkOf2NodesAnd2Users
({
nbCores
:
NB_CORES_FOR_COMPUTATION
,
nbCores
:
NB_CORES_FOR_COMPUTATION
,
...
...
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