AlreadyAskedFor -> WaitingFor rename, for reasons of least surprise. #1341

pull rebroad wants to merge 1 commits into bitcoin:master from rebroad:AlreadyAsked2Waiting changing 3 files +7 −7
  1. rebroad commented at 8:55 PM on May 17, 2012: contributor

    Also, reduces confusion when combined with future pull requests.

    This is a small change, and possibly seems petty, but it's useful for two reasons:

    1. Principle of least surprise. Waiting can end (and does in the code), but Already Asked for requires a past event that's happened to unhappen. This is confusing.

    2. Later code (which I am hoping gets pulled when finished, such as #1326) uses variables that make sense, and makes the code simpler to understand when used with this renamed mapping.

    3. probably other reasons....

  2. Rename, for reasons of least surprise.
    Also, reduces confusion when combined with future pull requests.
    312e5ae68d
  3. Diapolo commented at 8:56 PM on May 17, 2012: none

    I know from own observations, that core devs dislike variable or function renaming without a very good reason ;), only wanted to say...

  4. rebroad commented at 9:02 PM on May 17, 2012: contributor

    Principle of least astonishment is usually the best reason for such a change, along with naming conventions probably coming a close second (or joint first).

  5. jgarzik commented at 9:43 PM on May 17, 2012: contributor

    NAK, breaks other more important changes for little gain

  6. jgarzik closed this on May 17, 2012

  7. rebroad cross-referenced this on May 18, 2012 from issue mapAlreadyAskedFor gets additions when AlreadyHave() by rebroad
  8. rebroad cross-referenced this on Sep 17, 2014 from issue Remove tx from AlreadyAskedFor list once we receive it, not when we process it. by rebroad
  9. suprnurd referenced this in commit 80b71d9746 on Dec 5, 2017
  10. lateminer referenced this in commit d6dcacc5c7 on Jan 22, 2019
  11. lateminer referenced this in commit c992fc1523 on May 6, 2020
  12. lateminer referenced this in commit e4041b1631 on May 6, 2020
  13. 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:56 UTC