changeset 26720:fee217f23f5b

Trivial: Rephrase the definition of difficulty in the code.
author Karl-Johan Alm <karljohan-alm@garage.co.jp>
date Mon, 23 Jan 2017 10:12:02 +0900
parents a78df86993b9
children a8520fefcedf
files src/rpc/blockchain.cpp
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/rpc/blockchain.cpp	Thu Feb 23 19:03:11 2017 +0100
+++ b/src/rpc/blockchain.cpp	Mon Jan 23 10:12:02 2017 +0900
@@ -43,10 +43,15 @@
 extern void TxToJSON(const CTransaction& tx, const uint256 hashBlock, UniValue& entry);
 void ScriptPubKeyToJSON(const CScript& scriptPubKey, UniValue& out, bool fIncludeHex);
 
+/**
+ * Get the difficulty of the net wrt to the given block index, or the chain tip if
+ * not provided.
+ *
+ * @return A floating point number that is a multiple of the main net minimum
+ * difficulty (4295032833 hashes).
+ */
 double GetDifficulty(const CBlockIndex* blockindex)
 {
-    // Floating point number that is a multiple of the minimum difficulty,
-    // minimum difficulty = 1.0.
     if (blockindex == NULL)
     {
         if (chainActive.Tip() == NULL)