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
f4133b2e
Commit
f4133b2e
authored
9 years ago
by
Cédric Moreau
Browse files
Options
Downloads
Patches
Plain Diff
Fix: MonetaryMass field in the DB was wrong when block came from local node
parent
f2459df4
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/lib/blockchainContext.js
+1
-1
1 addition, 1 deletion
app/lib/blockchainContext.js
app/lib/proof.js
+1
-0
1 addition, 0 deletions
app/lib/proof.js
with
2 additions
and
1 deletion
app/lib/blockchainContext.js
+
1
−
1
View file @
f4133b2e
...
...
@@ -209,7 +209,7 @@ function BlockchainContext(conf, dal) {
function
updateBlocksComputedVars
(
current
,
block
,
done
)
{
// Monetary Mass update
if
(
current
)
{
block
.
monetaryMass
=
(
current
.
monetaryMass
||
0
)
+
block
.
dividend
*
block
.
membersCount
;
block
.
monetaryMass
=
(
current
.
monetaryMass
||
0
)
+
(
block
.
dividend
||
0
)
*
block
.
membersCount
;
}
// UD Time update
if
(
block
.
number
==
0
)
{
...
...
This diff is collapsed.
Click to expand it.
app/lib/proof.js
+
1
−
0
View file @
f4133b2e
...
...
@@ -37,6 +37,7 @@ process.on('message', function(stuff){
var
testsPerRound
=
Math
.
max
(
Math
.
round
(
testsPerSecond
*
cpu
),
1
);
process
.
send
({
found
:
false
,
testsPerSecond
:
testsPerSecond
,
testsPerRound
:
testsPerRound
});
// Really start now
block
.
nonce
=
208320
;
var
testsCount
=
0
;
if
(
nbZeros
==
0
)
{
block
.
nonce
=
0
;
...
...
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