Skip to content

Conversation

@kallewoof
Copy link
Contributor

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.

@fanquake fanquake added the Docs label Jan 23, 2017
Copy link
Member

@laanwj laanwj Feb 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gladly!

@luke-jr
Copy link
Member

luke-jr commented Feb 2, 2017

utACK, but prefer "original mainnet difficulty" in case we bump up the minimum someday.

@kallewoof
Copy link
Contributor Author

We wouldn't update the constants if the value they're based on changed?

@jtimon
Copy link
Contributor

jtimon commented Feb 24, 2017

utACK
Perhaps use doxygen's @return ?

@sipa
Copy link
Member

sipa commented Feb 24, 2017

utACK

@kallewoof
Copy link
Contributor Author

@jtimon Makes sense. Updated.

Copy link
Contributor

@jonasschnelli jonasschnelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK dc222f8

@laanwj laanwj merged commit dc222f8 into bitcoin:master Feb 24, 2017
laanwj added a commit that referenced this pull request Feb 24, 2017
dc222f8 Trivial: Rephrase the definition of difficulty in the code. (Karl-Johan Alm)
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 3, 2019
dc222f8 Trivial: Rephrase the definition of difficulty in the code. (Karl-Johan Alm)
UdjinM6 pushed a commit to dashpay/dash that referenced this pull request Jan 7, 2019
* Merge bitcoin#9815: Trivial: use EXIT_ codes instead of magic numbers

a87d02a use EXIT_ codes instead of magic numbers (Marko Bencun)

* Merge bitcoin#9801: Removed redundant parameter from mempool.PrioritiseTransaction

eaea2bb Removed redundant parameter from mempool.PrioritiseTransaction (gubatron)

* remove extra parameter (see 3a3745bb) in dash specific code

* Merge bitcoin#9819: Remove harmless read of unusued priority estimates

bc8fd12 Remove harmless read of unusued priority estimates (Alex Morcos)

* Merge bitcoin#9766: Add --exclude option to rpc-tests.py

c578408 Add exclude option to rpc-tests.py (John Newbery)

* Merge bitcoin#9577: Fix docstrings in qa tests

3f95a80 Fix docstrings in qa tests (John Newbery)

* Merge bitcoin#9823: qa: Set correct path for binaries in rpc tests

3333ad0 qa: Set correct path for binaries in rpc tests (MarcoFalke)

* Merge bitcoin#9833: Trivial: fix comments referencing AppInit2

ef9f495 Trivial: fix comments referencing AppInit2 (Marko Bencun)

* Merge bitcoin#9612: [trivial] Rephrase the definition of difficulty.

dc222f8 Trivial: Rephrase the definition of difficulty in the code. (Karl-Johan Alm)

* Merge bitcoin#9847: Extra test vector for BIP32

30aedcb BIP32 extra test vector (Pieter Wuille)

* Merge bitcoin#9839: [qa] Make import-rescan.py watchonly check reliable

864890a [qa] Make import-rescan.py watchonly check reliable (Russell Yanofsky)

Tree-SHA512: ea0e2b1d4fc8f35174c3d575fb751b428daf6ad3aa944fad4e3ddcc9195e4f17051473acabc54203b1d27cca64cf911b737ab92e986c40ef384410652e2dbea1

* Change back file params
@kallewoof kallewoof deleted the clarify-difficulty branch October 17, 2019 08:48
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants