Cap nAttempts penalty at 8 and switch to pow instead of a division loop. #6029

pull gmaxwell wants to merge 1 commits into bitcoin:master from gmaxwell:nAttempts_cost changing 1 files +2 −3
  1. gmaxwell commented at 6:52 PM on April 19, 2015: contributor

    On hosts that had spent some time with a failed internet connection their nAttempts penalty was going through the roof (e.g. thousands for all peers) and as a result the connect search was pegging the CPU and failing to get more than a 4 connections after days of running (because it was taking so long per try).

  2. Cap nAttempts penalty at 8 and switch to pow instead of a division loop.
    On hosts that had spent some time with a failed internet connection their
     nAttempts penalty was going through the roof (e.g. thousands for all peers)
     and as a result the connect search was pegging the CPU and failing to get
     more than a 4 connections after days of running (because it was taking so
     long per try).
    a784f90c98
  3. gmaxwell added this to the milestone 0.10.0 on Apr 19, 2015
  4. gmaxwell cross-referenced this on Apr 19, 2015 from issue Avoid counting failed connect attempts when probably offline. by gmaxwell
  5. laanwj commented at 11:46 AM on April 20, 2015: member

    Makes sense, utACK

  6. laanwj merged this on Apr 20, 2015
  7. laanwj closed this on Apr 20, 2015

  8. laanwj referenced this in commit 71900b4426 on Apr 20, 2015
  9. laanwj commented at 12:00 PM on April 20, 2015: member

    Cherry-picked to 0.10 as 139cd8177be4895f8b4c2befee35030bdf96132

  10. gmaxwell referenced this in commit 139cd8177b on Apr 20, 2015
  11. reddink referenced this in commit cc13dbf71c on May 27, 2020
  12. bitcoin locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-20 06:55 UTC