Merge pull request #4083 from mempool/mononaut/fix-partial-index-difficulty

fix partially indexed difficulty bug
This commit is contained in:
softsimon 2023-08-01 18:49:45 +09:00 committed by GitHub
commit 63993b01aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -438,6 +438,7 @@ class Mining {
const oldestConsecutiveBlock = await BlocksRepository.$getOldestConsecutiveBlock();
if (config.MEMPOOL.INDEXING_BLOCKS_AMOUNT !== -1) {
currentBits = oldestConsecutiveBlock.bits;
currentDifficulty = oldestConsecutiveBlock.difficulty;
}
let totalBlockChecked = 0;