Skip to content

Commit a657aff

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

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
@@ -31,7 +31,7 @@ class CMasternodeMetaInfo
3131
public:
3232
uint256 m_protx_hash;
3333

34-
//the dsq count from the last dsq broadcast of this node
34+
//! the dsq count from the last dsq broadcast of this node
3535
int64_t m_last_dsq{0};
3636
int m_mixing_tx_count{0};
3737

@@ -62,17 +62,16 @@ class CMasternodeMetaInfo
6262
obj.m_platform_ban_updated);
6363
}
6464

65-
UniValue ToJson() const EXCLUSIVE_LOCKS_REQUIRED(!cs);
65+
UniValue ToJson() const;
6666

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

7371
void SetLastOutboundAttempt(int64_t t) { lastOutboundAttempt = t; ++outboundAttemptCount; }
7472
void SetLastOutboundSuccess(int64_t t) { lastOutboundSuccess = t; outboundAttemptCount = 0; }
75-
bool SetPlatformBan(bool is_banned, int height) EXCLUSIVE_LOCKS_REQUIRED(!cs)
73+
74+
bool SetPlatformBan(bool is_banned, int height)
7675
{
7776
if (height < m_platform_ban_updated) {
7877
return false;
@@ -215,16 +214,16 @@ class CMasternodeMetaMan : public MasternodeMetaStore
215214

216215
bool IsValid() const { return is_valid; }
217216

218-
CMasternodeMetaInfo GetInfo(const uint256& proTxHash) EXCLUSIVE_LOCKS_REQUIRED(!cs);
217+
CMasternodeMetaInfo GetInfo(const uint256& proTxHash) const EXCLUSIVE_LOCKS_REQUIRED(!cs);
219218

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

226-
void AllowMixing(const uint256& proTxHash);
227-
void DisallowMixing(const uint256& proTxHash);
225+
void AllowMixing(const uint256& proTxHash) EXCLUSIVE_LOCKS_REQUIRED(!cs);
226+
void DisallowMixing(const uint256& proTxHash) EXCLUSIVE_LOCKS_REQUIRED(!cs);
228227
bool IsValidForMixingTxes(const uint256& protx_hash) const EXCLUSIVE_LOCKS_REQUIRED(!cs);
229228

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

0 commit comments

Comments
 (0)