aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/net_processing.h')
-rw-r--r--src/net_processing.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/net_processing.h b/src/net_processing.h
index 7caefc80ca..0113e25f7e 100644
--- a/src/net_processing.h
+++ b/src/net_processing.h
@@ -9,13 +9,16 @@
#include <net.h>
#include <validationinterface.h>
#include <consensus/params.h>
+#include <sync.h>
+
+extern CCriticalSection cs_main;
/** Default for -maxorphantx, maximum number of orphan transactions kept in memory */
static const unsigned int DEFAULT_MAX_ORPHAN_TRANSACTIONS = 100;
/** Default number of orphan+recently-replaced txn to keep around for block reconstruction */
static const unsigned int DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN = 100;
/** Default for BIP61 (sending reject messages) */
-static constexpr bool DEFAULT_ENABLE_BIP61 = true;
+static constexpr bool DEFAULT_ENABLE_BIP61{false};
class PeerLogicValidation final : public CValidationInterface, public NetEventsInterface {
private:
@@ -61,14 +64,14 @@ public:
bool SendMessages(CNode* pto) override EXCLUSIVE_LOCKS_REQUIRED(pto->cs_sendProcessing);
/** Consider evicting an outbound peer based on the amount of time they've been behind our tip */
- void ConsiderEviction(CNode *pto, int64_t time_in_seconds);
+ void ConsiderEviction(CNode *pto, int64_t time_in_seconds) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
/** Evict extra outbound peers. If we think our tip may be stale, connect to an extra outbound */
void CheckForStaleTipAndEvictPeers(const Consensus::Params &consensusParams);
/** If we have extra outbound peers, try to disconnect the one with the oldest block announcement */
- void EvictExtraOutboundPeers(int64_t time_in_seconds);
+ void EvictExtraOutboundPeers(int64_t time_in_seconds) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
private:
- int64_t m_stale_tip_check_time; //! Next time to check for stale tip
+ int64_t m_stale_tip_check_time; //!< Next time to check for stale tip
/** Enable BIP61 (sending reject messages) */
const bool m_enable_bip61;