Difficulty is defined as a multiple of the minimum difficulty, but it is not clear that this in reality means the main net difficulty, not the difficulty of the active net.
See #9597.
44 | @@ -45,8 +45,8 @@ void ScriptPubKeyToJSON(const CScript& scriptPubKey, UniValue& out, bool fInclud 45 | 46 | double GetDifficulty(const CBlockIndex* blockindex) 47 | { 48 | - // Floating point number that is a multiple of the minimum difficulty, 49 | - // minimum difficulty = 1.0. 50 | + // Floating point number that is a multiple of the main net minimum
Would be even better to turn it into a doxygen comment and move it outside the function. E.g.
/** Returns a floating point number that is a multiple of the main net minimum
* difficulty (4295032833 hashes).
*/
double GetDifficulty(const CBlockIndex* blockindex)
...
Gladly!
utACK, but prefer "original mainnet difficulty" in case we bump up the minimum someday.
We wouldn't update the constants if the value they're based on changed?
utACK
utACK dc222f8f634d5bb82d4646f9a17f0d40a60bcf60