Skip to content

Commit dc222f8

Browse files
committed
Trivial: Rephrase the definition of difficulty in the code.
1 parent 692c9ed commit dc222f8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/rpc/blockchain.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,15 @@ static CUpdatedBlock latestblock;
4343
extern void TxToJSON(const CTransaction& tx, const uint256 hashBlock, UniValue& entry);
4444
void ScriptPubKeyToJSON(const CScript& scriptPubKey, UniValue& out, bool fIncludeHex);
4545

46+
/**
47+
* Get the difficulty of the net wrt to the given block index, or the chain tip if
48+
* not provided.
49+
*
50+
* @return A floating point number that is a multiple of the main net minimum
51+
* difficulty (4295032833 hashes).
52+
*/
4653
double GetDifficulty(const CBlockIndex* blockindex)
4754
{
48-
// Floating point number that is a multiple of the minimum difficulty,
49-
// minimum difficulty = 1.0.
5055
if (blockindex == NULL)
5156
{
5257
if (chainActive.Tip() == NULL)

0 commit comments

Comments
 (0)