From 808b90d9abae0d134fdc52249cd9df9fb27acf08 Mon Sep 17 00:00:00 2001 From: Alexandru Ionut Budisteanu Date: Mon, 20 Jul 2020 20:04:39 +0300 Subject: [PATCH] code refactor Difficulty --- .../blockchain/global/difficulty/Blockchain-Difficulty.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/blockchain/global/difficulty/Blockchain-Difficulty.js b/src/common/blockchain/global/difficulty/Blockchain-Difficulty.js index 2eb9b93a3..377449083 100644 --- a/src/common/blockchain/global/difficulty/Blockchain-Difficulty.js +++ b/src/common/blockchain/global/difficulty/Blockchain-Difficulty.js @@ -129,7 +129,7 @@ class BlockchainDifficulty{ //avoid first Block, because the firstBlock is correlated with the last block of the POW const PoSModulo = BlockchainGenesis.PoSModulo(blockNumber); - if ( PoSModulo && (blockNumber+1) % PoSModulo === 10 ) firstBlock += 1 + if ( PoSModulo && ( (blockNumber+1) % PoSModulo === 10 ) ) firstBlock += 1 //adding blocks 0..8 for (let i = firstBlock; i < blockNumber; i++) {