Update comments and documentation referencing main.cpp.
[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-
CryptAxe commented at 7:09 AM on February 15, 2017: contributor
-
[Trivial] Update comments referencing main.cpp 5ca5db250c
-
laanwj commented at 7:38 AM on February 15, 2017: member
- laanwj added the label Refactoring on Feb 15, 2017
-
paveljanik commented at 10:38 AM on February 15, 2017: contributor
-
fanquake commented at 12:30 PM on February 15, 2017: member
utACK 5ca5db2
-
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: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:
Update internal-to-net_processing.cpp comment 6878c0655a17dc03c839Remove 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.
jnewbery commented at 11:05 PM on February 15, 2017: memberutACK 17dc03c839c2b7141cd14b6ff51c18a232d2977e
fanquake commented at 12:33 PM on February 16, 2017: memberre-utACK 17dc03c
laanwj referenced this in commit 8743320d6c on Feb 16, 2017laanwj commented at 1:02 PM on February 16, 2017: memberSquashed https://github.com/bitcoin/bitcoin/pull/9763/commits/5ca5db250c23a6181f80ad858f4ded226baf8712 https://github.com/bitcoin/bitcoin/pull/9763/commits/6878c0655a295877f54c31e2b5758925108e70f5 https://github.com/bitcoin/bitcoin/pull/9763/commits/17dc03c839c2b7141cd14b6ff51c18a232d2977e into 00e623d0b8cd1c261a2671aa8ab221a0474bc7c8 and merged via 8743320.
laanwj closed this on Feb 16, 2017codablock referenced this in commit 912f1ba608 on Jan 19, 2018codablock referenced this in commit 52819ca9b9 on Jan 23, 2018andvgal referenced this in commit a467d49d65 on Jan 6, 2019CryptoCentric referenced this in commit 30d5393bc3 on Feb 27, 2019MarcoFalke locked this on Sep 8, 2021ContributorsLabels
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
More mirrored repositories can be found on mirror.b10c.me