I got tired of the pointless stale tip notices in reindex and on nodes with connections disabled.
Skip stale tip checking if outbound connections are off or if reindexing. #14027
pull gmaxwell wants to merge 1 commits into bitcoin:master from gmaxwell:2018_08_noout_noextra changing 3 files +10 −5-
gmaxwell commented at 11:51 PM on August 22, 2018: contributor
- fanquake added the label P2P on Aug 22, 2018
-
fanquake commented at 12:19 AM on August 23, 2018: member
macOS build failed on Travis with:
CXX libbitcoin_server_a-torcontrol.o In file included from net_processing.cpp:6: ./net_processing.h:68:84: error: use of undeclared identifier 'cs_main' void EvictExtraOutboundPeers(int64_t time_in_seconds) EXCLUSIVE_LOCKS_REQUIRED(cs_main); ^ ./threadsafety.h:31:79: note: expanded from macro 'EXCLUSIVE_LOCKS_REQUIRED' #define EXCLUSIVE_LOCKS_REQUIRED(...) __attribute__((exclusive_locks_required(__VA_ARGS__))) ^ 1 error generated. Makefile:6006: recipe for target 'libbitcoin_server_a-net_processing.o' failed -
promag commented at 12:52 AM on August 23, 2018: member
Concept ACK.
-
in src/net.h:421 in 73b1272521 outdated
417 | @@ -416,6 +418,7 @@ class CConnman 418 | int nMaxOutbound; 419 | int nMaxAddnode; 420 | int nMaxFeeler; 421 | + bool fUseAddrmanOutgoing;
MarcoFalke commented at 12:58 AM on August 23, 2018:nit: Members should be snake_case and prefixed with m_ to distinguish them from non-members
in src/net_processing.cpp:3157 in 73b1272521 outdated
3153 | @@ -3154,7 +3154,7 @@ void PeerLogicValidation::ConsiderEviction(CNode *pto, int64_t time_in_seconds) 3154 | } 3155 | } 3156 | 3157 | -void PeerLogicValidation::EvictExtraOutboundPeers(int64_t time_in_seconds) 3158 | +void PeerLogicValidation::EvictExtraOutboundPeers(int64_t time_in_seconds) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
MarcoFalke commented at 12:59 AM on August 23, 2018:nit: Should be enough to put this into the header file.
in src/net_processing.h:71 in 73b1272521 outdated
64 | @@ -65,7 +65,7 @@ class PeerLogicValidation final : public CValidationInterface, public NetEventsI 65 | /** Evict extra outbound peers. If we think our tip may be stale, connect to an extra outbound */ 66 | void CheckForStaleTipAndEvictPeers(const Consensus::Params &consensusParams); 67 | /** If we have extra outbound peers, try to disconnect the one with the oldest block announcement */ 68 | - void EvictExtraOutboundPeers(int64_t time_in_seconds); 69 | + void EvictExtraOutboundPeers(int64_t time_in_seconds) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
MarcoFalke commented at 12:59 AM on August 23, 2018:Missing
extern CCriticalSection cs_main;and#include <sync.h>further up?Or just a forward decl:
+class CCriticalSection; +extern CCriticalSection cs_main;MarcoFalke commented at 1:11 AM on August 23, 2018: memberutACK 73b1272521b88f7dde9b8774968943116767cccf (doesn't compile for me, though)
gmaxwell commented at 2:45 AM on August 23, 2018: contributor@MarcoFalke how about now? :)
practicalswift commented at 8:07 AM on August 23, 2018: contributorConcept ACK
Increases signal to noise in our logging
Skip stale tip checking if outbound connections are off or if reindexing. 66b3fc5437MarcoFalke commented at 11:53 AM on August 23, 2018: memberre-utACK 66b3fc543706aad1aaccc403b4ee08f65fa5d17b
sdaftuar commented at 3:00 PM on September 10, 2018: memberACK
promag commented at 8:58 PM on September 10, 2018: memberutACK 66b3fc5.
ken2812221 commented at 9:14 AM on September 27, 2018: contributorutACK 66b3fc543706aad1aaccc403b4ee08f65fa5d17b
MarcoFalke merged this on Sep 27, 2018MarcoFalke closed this on Sep 27, 2018MarcoFalke referenced this in commit 423cb37658 on Sep 27, 2018PastaPastaPasta referenced this in commit 69c399f533 on Apr 16, 2020PastaPastaPasta referenced this in commit eed4322876 on Apr 16, 2020PastaPastaPasta referenced this in commit 33bdd4b020 on Apr 19, 2020PastaPastaPasta referenced this in commit b0e22cbf7e on Apr 20, 2020PastaPastaPasta referenced this in commit a7925d0d66 on May 10, 2020PastaPastaPasta referenced this in commit 6893c86d88 on May 12, 2020deadalnix referenced this in commit 36b3d31a10 on Jun 8, 2020PastaPastaPasta referenced this in commit 490ef353c2 on Jun 9, 2020PastaPastaPasta referenced this in commit 9ab6626d17 on Jun 9, 2020PastaPastaPasta referenced this in commit f5d65e0355 on Jun 10, 2020PastaPastaPasta referenced this in commit 7ae20523a9 on Jun 11, 2020ftrader referenced this in commit ea75a9a6de on Aug 17, 2020MarcoFalke locked this on Sep 8, 2021Labels
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-16 03:15 UTC
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-16 03:15 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me