Skip to content

Commit cdc9825

Browse files
committed
fix: removed leftover annotation, as follow-up conflict resolving with #6880
1 parent b57740d commit cdc9825

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

src/masternode/meta.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,11 @@ const CMasternodeMetaInfo& CMasternodeMetaMan::GetMetaInfoOrDefault(const uint25
7474
return it->second;
7575
}
7676

77-
CMasternodeMetaInfo CMasternodeMetaMan::GetInfo(const uint256& proTxHash) { return GetMetaInfoOrDefault(proTxHash); }
77+
CMasternodeMetaInfo CMasternodeMetaMan::GetInfo(const uint256& proTxHash) const
78+
{
79+
LOCK (cs);
80+
return GetMetaInfoOrDefault(proTxHash);
81+
}
7882

7983
CMasternodeMetaInfo& CMasternodeMetaMan::GetMetaInfo(const uint256& proTxHash)
8084
{

src/masternode/meta.h

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class CMasternodeMetaInfo
2929
public:
3030
uint256 m_protx_hash;
3131

32-
//the dsq count from the last dsq broadcast of this node
32+
//! the dsq count from the last dsq broadcast of this node
3333
int64_t m_last_dsq{0};
3434
int m_mixing_tx_count{0};
3535

@@ -60,17 +60,16 @@ class CMasternodeMetaInfo
6060
obj.m_platform_ban_updated);
6161
}
6262

63-
UniValue ToJson() const EXCLUSIVE_LOCKS_REQUIRED(!cs);
63+
UniValue ToJson() const;
6464

65-
public:
6665
// KEEP TRACK OF EACH GOVERNANCE ITEM IN CASE THIS NODE GOES OFFLINE, SO WE CAN RECALCULATE THEIR STATUS
67-
void AddGovernanceVote(const uint256& nGovernanceObjectHash) EXCLUSIVE_LOCKS_REQUIRED(!cs);
68-
69-
void RemoveGovernanceObject(const uint256& nGovernanceObjectHash) EXCLUSIVE_LOCKS_REQUIRED(!cs);
66+
void AddGovernanceVote(const uint256& nGovernanceObjectHash);
67+
void RemoveGovernanceObject(const uint256& nGovernanceObjectHash);
7068

7169
void SetLastOutboundAttempt(int64_t t) { lastOutboundAttempt = t; ++outboundAttemptCount; }
7270
void SetLastOutboundSuccess(int64_t t) { lastOutboundSuccess = t; outboundAttemptCount = 0; }
73-
bool SetPlatformBan(bool is_banned, int height) EXCLUSIVE_LOCKS_REQUIRED(!cs)
71+
72+
bool SetPlatformBan(bool is_banned, int height)
7473
{
7574
if (height < m_platform_ban_updated) {
7675
return false;
@@ -197,16 +196,16 @@ class CMasternodeMetaMan : public MasternodeMetaStore
197196

198197
bool IsValid() const { return is_valid; }
199198

200-
CMasternodeMetaInfo GetInfo(const uint256& proTxHash) EXCLUSIVE_LOCKS_REQUIRED(!cs);
199+
CMasternodeMetaInfo GetInfo(const uint256& proTxHash) const EXCLUSIVE_LOCKS_REQUIRED(!cs);
201200

202201
// We keep track of dsq (mixing queues) count to avoid using same masternodes for mixing too often.
203202
// MN's threshold is calculated as the last dsq count this specific masternode was used in a mixing
204203
// session plus a margin of 20% of masternode count. In other words we expect at least 20% of unique
205204
// masternodes before we ever see a masternode that we know already mixed someone's funds earlier.
206205
bool IsDsqOver(const uint256& protx_hash, int mn_count) const EXCLUSIVE_LOCKS_REQUIRED(!cs);
207206

208-
void AllowMixing(const uint256& proTxHash);
209-
void DisallowMixing(const uint256& proTxHash);
207+
void AllowMixing(const uint256& proTxHash) EXCLUSIVE_LOCKS_REQUIRED(!cs);
208+
void DisallowMixing(const uint256& proTxHash) EXCLUSIVE_LOCKS_REQUIRED(!cs);
210209
bool IsValidForMixingTxes(const uint256& protx_hash) const EXCLUSIVE_LOCKS_REQUIRED(!cs);
211210

212211
void AddGovernanceVote(const uint256& proTxHash, const uint256& nGovernanceObjectHash);

0 commit comments

Comments
 (0)