Don't assume two difficulty with the same value is impossible
This commit is contained in:
@@ -161,7 +161,18 @@ class Mining {
|
||||
++totalIndexed;
|
||||
}
|
||||
|
||||
await HashratesRepository.$saveHashrates(hashrates);
|
||||
// Add genesis block manually
|
||||
if (!indexedTimestamp.includes(genesisTimestamp)) {
|
||||
hashrates.push({
|
||||
hashrateTimestamp: genesisTimestamp,
|
||||
avgHashrate: await bitcoinClient.getNetworkHashPs(1, 1),
|
||||
poolId: null
|
||||
});
|
||||
}
|
||||
|
||||
if (hashrates.length > 0) {
|
||||
await HashratesRepository.$saveHashrates(hashrates);
|
||||
}
|
||||
await HashratesRepository.$setLatestRunTimestamp();
|
||||
this.hashrateIndexingStarted = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user