[Trivial] Update comments referencing main.cpp #9763

pull CryptAxe wants to merge 3 commits into bitcoin:master from CryptAxe:comments changing 3 files +4 −4
  1. CryptAxe commented at 7:09 AM on February 15, 2017: contributor

    Update comments and documentation referencing main.cpp.

  2. [Trivial] Update comments referencing main.cpp 5ca5db250c
  3. laanwj commented at 7:38 AM on February 15, 2017: member
  4. laanwj added the label Refactoring on Feb 15, 2017
  5. fanquake commented at 12:30 PM on February 15, 2017: member

    utACK 5ca5db2

  6. in src/test/DoS_tests.cpp:None in 5ca5db250c outdated
      22 | @@ -23,7 +23,7 @@
      23 |  #include <boost/foreach.hpp>
      24 |  #include <boost/test/unit_test.hpp>
      25 |  
      26 | -// Tests this internal-to-main.cpp method:
      27 | +// Tests this internal-to-net_processing.cpp method:
    


    jnewbery commented at 10:34 PM on February 15, 2017:

    May as well correct the entire comment while you're doing this:

    // Tests these internal net_processing.cpp methods:

  7. in src/txmempool.cpp:None in 5ca5db250c outdated
     394 | @@ -395,7 +395,7 @@ bool CTxMemPool::addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry,
     395 |  {
     396 |      NotifyEntryAdded(entry.GetSharedTx());
     397 |      // Add to memory pool without checking anything.
     398 | -    // Used by main.cpp AcceptToMemoryPool(), which DOES do
     399 | +    // Used by validation.cpp AcceptToMemoryPool(), which DOES do
    


    jnewbery commented at 10:34 PM on February 15, 2017:

    Why not remove the name of the source file entirely?


    CryptAxe commented at 10:37 PM on February 15, 2017:

    It's useful to know where the transaction is being checked before it is added using this function. Otherwise I guess you could use grep to figure out where AcceptToMemoryPool() went but why not just say where it is?

    Edit: I guess if it moves again then this comment will need to be updated so that is a valid concern. I think that it is helpful enough to be worth that possibility, though.


    jnewbery commented at 10:45 PM on February 15, 2017:

    grep, ack, tag files, ... there are many ways to find where the AcceptToMemoryPool() definition is. Naming the source file doesn't add any clarity here, and as you say adds cost to future refactors.


    CryptAxe commented at 10:53 PM on February 15, 2017:

    Fair enough :+1:

  8. Update internal-to-net_processing.cpp comment 6878c0655a
  9. Remove name of file from comment
    Remove name of file where AcceptToMemoryPool() is defined from comment. This will prevent anyone from having to update the comment again with future refactoring.
    17dc03c839
  10. jnewbery commented at 11:05 PM on February 15, 2017: member

    utACK 17dc03c839c2b7141cd14b6ff51c18a232d2977e

  11. fanquake commented at 12:33 PM on February 16, 2017: member

    re-utACK 17dc03c

  12. laanwj referenced this in commit 8743320d6c on Feb 16, 2017
  13. laanwj closed this on Feb 16, 2017

  14. codablock referenced this in commit 912f1ba608 on Jan 19, 2018
  15. codablock referenced this in commit 52819ca9b9 on Jan 23, 2018
  16. andvgal referenced this in commit a467d49d65 on Jan 6, 2019
  17. CryptoCentric referenced this in commit 30d5393bc3 on Feb 27, 2019
  18. MarcoFalke 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-04-22 06:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me