Skip to content
Snippets Groups Projects
Commit f4133b2e authored by Cédric Moreau's avatar Cédric Moreau
Browse files

Fix: MonetaryMass field in the DB was wrong when block came from local node

parent f2459df4
No related branches found
No related tags found
No related merge requests found
...@@ -209,7 +209,7 @@ function BlockchainContext(conf, dal) { ...@@ -209,7 +209,7 @@ function BlockchainContext(conf, dal) {
function updateBlocksComputedVars (current, block, done) { function updateBlocksComputedVars (current, block, done) {
// Monetary Mass update // Monetary Mass update
if (current) { if (current) {
block.monetaryMass = (current.monetaryMass || 0) + block.dividend * block.membersCount; block.monetaryMass = (current.monetaryMass || 0) + (block.dividend || 0) * block.membersCount;
} }
// UD Time update // UD Time update
if (block.number == 0) { if (block.number == 0) {
......
...@@ -37,6 +37,7 @@ process.on('message', function(stuff){ ...@@ -37,6 +37,7 @@ process.on('message', function(stuff){
var testsPerRound = Math.max(Math.round(testsPerSecond * cpu), 1); var testsPerRound = Math.max(Math.round(testsPerSecond * cpu), 1);
process.send({ found: false, testsPerSecond: testsPerSecond, testsPerRound: testsPerRound }); process.send({ found: false, testsPerSecond: testsPerSecond, testsPerRound: testsPerRound });
// Really start now // Really start now
block.nonce = 208320;
var testsCount = 0; var testsCount = 0;
if (nbZeros == 0) { if (nbZeros == 0) {
block.nonce = 0; block.nonce = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment