Skip to content

Commit 5729dbb

Browse files
committed
refactor: remove extraneous lock annotations from function definitions
These annotations belong in the declarations rather than the definitions. While harmless now, future versions of clang may warn about these.
1 parent a961ad1 commit 5729dbb

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

src/net_processing.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,15 +1164,15 @@ class PeerManagerImpl final : public PeerManager
11641164
void PushAddress(Peer& peer, const CAddress& addr) EXCLUSIVE_LOCKS_REQUIRED(g_msgproc_mutex);
11651165
};
11661166

1167-
const CNodeState* PeerManagerImpl::State(NodeId pnode) const EXCLUSIVE_LOCKS_REQUIRED(cs_main)
1167+
const CNodeState* PeerManagerImpl::State(NodeId pnode) const
11681168
{
11691169
std::map<NodeId, CNodeState>::const_iterator it = m_node_states.find(pnode);
11701170
if (it == m_node_states.end())
11711171
return nullptr;
11721172
return &it->second;
11731173
}
11741174

1175-
CNodeState* PeerManagerImpl::State(NodeId pnode) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
1175+
CNodeState* PeerManagerImpl::State(NodeId pnode)
11761176
{
11771177
return const_cast<CNodeState*>(std::as_const(*this).State(pnode));
11781178
}

src/validation.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1849,7 +1849,6 @@ PackageMempoolAcceptResult MemPoolAccept::AcceptPackage(const Package& package,
18491849

18501850
MempoolAcceptResult AcceptToMemoryPool(Chainstate& active_chainstate, const CTransactionRef& tx,
18511851
int64_t accept_time, bool bypass_limits, bool test_accept)
1852-
EXCLUSIVE_LOCKS_REQUIRED(::cs_main)
18531852
{
18541853
AssertLockHeld(::cs_main);
18551854
const CChainParams& chainparams{active_chainstate.m_chainman.GetParams()};

src/wallet/rpc/util.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ void HandleWalletError(const std::shared_ptr<CWallet> wallet, DatabaseStatus& st
179179
}
180180
}
181181

182-
void AppendLastProcessedBlock(UniValue& entry, const CWallet& wallet) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
182+
void AppendLastProcessedBlock(UniValue& entry, const CWallet& wallet)
183183
{
184184
AssertLockHeld(wallet.cs_wallet);
185185
UniValue lastprocessedblock{UniValue::VOBJ};

src/wallet/spend.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ static OutputType GetOutputType(TxoutType type, bool is_from_p2sh)
260260
// Fetch and validate the coin control selected inputs.
261261
// Coins could be internal (from the wallet) or external.
262262
util::Result<PreSelectedInputs> FetchSelectedInputs(const CWallet& wallet, const CCoinControl& coin_control,
263-
const CoinSelectionParams& coin_selection_params) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
263+
const CoinSelectionParams& coin_selection_params)
264264
{
265265
PreSelectedInputs result;
266266
const bool can_grind_r = wallet.CanGrindR();

src/wallet/wallet.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,13 +1366,13 @@ void CWallet::MarkConflicted(const uint256& hashBlock, int conflicting_height, c
13661366

13671367
}
13681368

1369-
void CWallet::RecursiveUpdateTxState(const uint256& tx_hash, const TryUpdatingStateFn& try_updating_state) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) {
1369+
void CWallet::RecursiveUpdateTxState(const uint256& tx_hash, const TryUpdatingStateFn& try_updating_state) {
13701370
// Do not flush the wallet here for performance reasons
13711371
WalletBatch batch(GetDatabase(), false);
13721372
RecursiveUpdateTxState(&batch, tx_hash, try_updating_state);
13731373
}
13741374

1375-
void CWallet::RecursiveUpdateTxState(WalletBatch* batch, const uint256& tx_hash, const TryUpdatingStateFn& try_updating_state) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) {
1375+
void CWallet::RecursiveUpdateTxState(WalletBatch* batch, const uint256& tx_hash, const TryUpdatingStateFn& try_updating_state) {
13761376
std::set<uint256> todo;
13771377
std::set<uint256> done;
13781378

0 commit comments

Comments
 (0)