Skip to content

Conversation

Diapolo
Copy link

@Diapolo Diapolo commented Jan 3, 2013

  • some users reported it as weird, that the estimated block count could be
    lower than our own nodes block number (which is indeed bad)
  • this pull adds a new default behaviour, which displays our own block
    number as estimated block number, if own >= est. block count
  • the pull raises space for nodes block counts in cPeerBlockCounts to 8 to
    be more accurate
  • also removes a reduntant setNumBlocks() call in RPCConsole and moves
    initialisation of numBlocksAtStartup in ClientModel, where it belongs

@BitcoinPullTester
Copy link

Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/a79bb07800bbc8c72cf97cf8b34e9137ea84b03a for binaries and test log.

if (newNumBlocks < newNumBlocksOfPeers)
emit numBlocksChanged(newNumBlocks, newNumBlocksOfPeers);
else
emit numBlocksChanged(newNumBlocks, newNumBlocks);
Copy link
Member

Choose a reason for hiding this comment

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

wouldn't "emit numBlocksChanges(newNumBlocks, std::max(newNumBlocksOfPeers, newNumBlocks))" be the same?

Copy link
Author

Choose a reason for hiding this comment

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

Yeah, that's better, thanks for mentioning :).

- some users reported it as weird, that the estimated block count could be
  lower than our own nodes block number (which is indeed true and not good)
- this pull adds a new default behaviour, which displays our own block
  number as estimated block number, if own >= est. block count
- the pull raises space for nodes block counts in cPeerBlockCounts to 8 to
  be more accurate
- also removes a reduntant setNumBlocks() call in RPCConsole and moves
  initialisation of numBlocksAtStartup in ClientModel, where it belongs
@BitcoinPullTester
Copy link

Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/54413aab135aa84f60bfcb477a4d2ecfb72edbac for binaries and test log.

@laanwj
Copy link
Member

laanwj commented Jan 5, 2013

ACK

laanwj added a commit that referenced this pull request Jan 5, 2013
Bitcoin-Qt: never display own block count > estimated block count
@laanwj laanwj merged commit eb5c24c into bitcoin:master Jan 5, 2013
@luke-jr
Copy link
Member

luke-jr commented Jan 16, 2013

Is there some background to this? I don't understand why...

@robbak
Copy link
Contributor

robbak commented Jan 16, 2013

The client estimates the current block count by averaging the block counts
of connected clients. When you have just received the latest one, then your
block count can be above the average.

Nothing to see here, move along.

On 16 January 2013 14:43, Luke-Jr notifications@github.com wrote:

Is there some background to this? I don't understand why...


Reply to this email directly or view it on GitHubhttps://github.com//pull/2148#issuecomment-12304731.

laudney pushed a commit to reddcoin-project/reddcoin-3.10 that referenced this pull request Mar 19, 2014
Bitcoin-Qt: never display own block count > estimated block count
HashUnlimited pushed a commit to HashUnlimited/chaincoin that referenced this pull request Jul 2, 2018
HashUnlimited added a commit to chaincoin/chaincoin that referenced this pull request Jul 2, 2018
Fix block value/payee validation in lite mode (bitcoin#2148)
HashUnlimited pushed a commit to HashUnlimited/chaincoin that referenced this pull request Jul 2, 2018
HashUnlimited pushed a commit to HashUnlimited/chaincoin that referenced this pull request Jul 3, 2018
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jul 13, 2018
owlhooter pushed a commit to owlhooter/mazacoin-new that referenced this pull request Oct 11, 2018
guruvan added a commit to guruvan/maza that referenced this pull request Nov 8, 2018
* MAZA-POS: (5575 commits)
  Mazafication of code More mazafication More mazafications and compile correction fixes fix for build issues fix for build issues fix string in net.cpp correct pow.cpp correct validation.cpp fixing for build errors fix typo Merge remote-tracking branch 'origin/MAZA-POS' into MAZA-POS
  merge to dash rebase
  Release notes 0.12.3.3
  Remove redundant parameter fCheckDuplicateInputs from CheckTransaction
  Fix crash bug with duplicate inputs within a transaction
  Bump to 0.12.3.3
  Release notes 0.12.3.2 (bitcoin#2174)
  Add tests for special rules for slow blocks on devnet/testnet (bitcoin#2176)
  Allow mining min diff for very slow (2h+) blocks (bitcoin#2175)
  Fix issues with selections on Masternode tab (bitcoin#2170)
  Sync mn list and mnw list from 3 peers max (bitcoin#2169)
  A few devnet related fixes (bitcoin#2168)
  Adjust diff for slow testnet/devnet blocks a bit smoother (bitcoin#2161)
  Make PS Buttons not react to spacebar (bitcoin#2154)
  Bump to 0.12.3.2 (bitcoin#2173)
  Bump to 0.12.3.1 (bitcoin#2158)
  Update release notes (bitcoin#2155)
  Use correct protocol when serializing messages in reply to `getdata` (bitcoin#2157)
  Fix p2pkh tests asserts (bitcoin#2153)
  Fix block value/payee validation in lite mode (bitcoin#2148)
  ...
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants