aboutsummaryrefslogtreecommitdiff
path: root/src/addrman_impl.h
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2022-03-28 11:41:20 +0200
committerMacroFake <falke.marco@gmail.com>2022-07-26 11:04:08 +0200
commitfa21fc60c292ab947b2200e54201440f16230566 (patch)
tree78560faca81169b481c1dc93ebe4787f32e40d15 /src/addrman_impl.h
parentfa9284c3e9acec4b44b2560256f27b3d78c753e2 (diff)
scripted-diff: Rename addrman time symbols
-BEGIN VERIFY SCRIPT- ren() { sed -i "s:\<$1\>:$2:g" $(git grep -l "\<$1\>" ./src ./test); } ren nLastTry m_last_try ren nLastSuccess m_last_success ren nLastGood m_last_good ren nLastCountAttempt m_last_count_attempt ren nSinceLastTry since_last_try ren nTimePenalty time_penalty ren nUpdateInterval update_interval ren fCurrentlyOnline currently_online -END VERIFY SCRIPT-
Diffstat (limited to 'src/addrman_impl.h')
-rw-r--r--src/addrman_impl.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/addrman_impl.h b/src/addrman_impl.h
index 9d98cdde54..d675798c03 100644
--- a/src/addrman_impl.h
+++ b/src/addrman_impl.h
@@ -38,16 +38,16 @@ class AddrInfo : public CAddress
{
public:
//! last try whatsoever by us (memory only)
- int64_t nLastTry{0};
+ int64_t m_last_try{0};
//! last counted attempt (memory only)
- int64_t nLastCountAttempt{0};
+ int64_t m_last_count_attempt{0};
//! where knowledge about this address first came from
CNetAddr source;
//! last successful connection by us
- int64_t nLastSuccess{0};
+ int64_t m_last_success{0};
//! connection attempts since last successful attempt
int nAttempts{0};
@@ -64,7 +64,7 @@ public:
SERIALIZE_METHODS(AddrInfo, obj)
{
READWRITEAS(CAddress, obj);
- READWRITE(obj.source, obj.nLastSuccess, obj.nAttempts);
+ READWRITE(obj.source, obj.m_last_success, obj.nAttempts);
}
AddrInfo(const CAddress &addrIn, const CNetAddr &addrSource) : CAddress(addrIn), source(addrSource)
@@ -112,7 +112,7 @@ public:
size_t size() const EXCLUSIVE_LOCKS_REQUIRED(!cs);
- bool Add(const std::vector<CAddress>& vAddr, const CNetAddr& source, int64_t nTimePenalty)
+ bool Add(const std::vector<CAddress>& vAddr, const CNetAddr& source, int64_t time_penalty)
EXCLUSIVE_LOCKS_REQUIRED(!cs);
bool Good(const CService& addr, int64_t nTime)
@@ -202,7 +202,7 @@ private:
int vvNew[ADDRMAN_NEW_BUCKET_COUNT][ADDRMAN_BUCKET_SIZE] GUARDED_BY(cs);
//! last time Good was called (memory only). Initially set to 1 so that "never" is strictly worse.
- int64_t nLastGood GUARDED_BY(cs){1};
+ int64_t m_last_good GUARDED_BY(cs){1};
//! Holds addrs inserted into tried table that collide with existing entries. Test-before-evict discipline used to resolve these collisions.
std::set<int> m_tried_collisions;
@@ -233,11 +233,11 @@ private:
/** Attempt to add a single address to addrman's new table.
* @see AddrMan::Add() for parameters. */
- bool AddSingle(const CAddress& addr, const CNetAddr& source, int64_t nTimePenalty) EXCLUSIVE_LOCKS_REQUIRED(cs);
+ bool AddSingle(const CAddress& addr, const CNetAddr& source, int64_t time_penalty) EXCLUSIVE_LOCKS_REQUIRED(cs);
bool Good_(const CService& addr, bool test_before_evict, int64_t time) EXCLUSIVE_LOCKS_REQUIRED(cs);
- bool Add_(const std::vector<CAddress> &vAddr, const CNetAddr& source, int64_t nTimePenalty) EXCLUSIVE_LOCKS_REQUIRED(cs);
+ bool Add_(const std::vector<CAddress> &vAddr, const CNetAddr& source, int64_t time_penalty) EXCLUSIVE_LOCKS_REQUIRED(cs);
void Attempt_(const CService& addr, bool fCountFailure, int64_t nTime) EXCLUSIVE_LOCKS_REQUIRED(cs);