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.
This commit is contained in:
1 parent
a961ad1beb
commit
5729dbbb74
5 files changed
+6
-7
No files matched your search
@@ -1164,7 +1164,7 @@ private:
|
|||||||
void PushAddress(Peer& peer, const CAddress& addr) EXCLUSIVE_LOCKS_REQUIRED(g_msgproc_mutex);
|
void PushAddress(Peer& peer, const CAddress& addr) EXCLUSIVE_LOCKS_REQUIRED(g_msgproc_mutex);
|
||||||
};
|
};
|
||||||
|
|
||||||
const CNodeState* PeerManagerImpl::State(NodeId pnode) const EXCLUSIVE_LOCKS_REQUIRED(cs_main)
|
const CNodeState* PeerManagerImpl::State(NodeId pnode) const
|
||||||
{
|
{
|
||||||
std::map<NodeId, CNodeState>::const_iterator it = m_node_states.find(pnode);
|
std::map<NodeId, CNodeState>::const_iterator it = m_node_states.find(pnode);
|
||||||
if (it == m_node_states.end())
|
if (it == m_node_states.end())
|
||||||
@@ -1172,7 +1172,7 @@ const CNodeState* PeerManagerImpl::State(NodeId pnode) const EXCLUSIVE_LOCKS_REQ
|
|||||||
return &it->second;
|
return &it->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
CNodeState* PeerManagerImpl::State(NodeId pnode) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
|
CNodeState* PeerManagerImpl::State(NodeId pnode)
|
||||||
{
|
{
|
||||||
return const_cast<CNodeState*>(std::as_const(*this).State(pnode));
|
return const_cast<CNodeState*>(std::as_const(*this).State(pnode));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1849,7 +1849,6 @@ PackageMempoolAcceptResult MemPoolAccept::AcceptPackage(const Package& package,
|
|||||||
|
|
||||||
MempoolAcceptResult AcceptToMemoryPool(Chainstate& active_chainstate, const CTransactionRef& tx,
|
MempoolAcceptResult AcceptToMemoryPool(Chainstate& active_chainstate, const CTransactionRef& tx,
|
||||||
int64_t accept_time, bool bypass_limits, bool test_accept)
|
int64_t accept_time, bool bypass_limits, bool test_accept)
|
||||||
EXCLUSIVE_LOCKS_REQUIRED(::cs_main)
|
|
||||||
{
|
{
|
||||||
AssertLockHeld(::cs_main);
|
AssertLockHeld(::cs_main);
|
||||||
const CChainParams& chainparams{active_chainstate.m_chainman.GetParams()};
|
const CChainParams& chainparams{active_chainstate.m_chainman.GetParams()};
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ void HandleWalletError(const std::shared_ptr<CWallet> wallet, DatabaseStatus& st
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppendLastProcessedBlock(UniValue& entry, const CWallet& wallet) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
|
void AppendLastProcessedBlock(UniValue& entry, const CWallet& wallet)
|
||||||
{
|
{
|
||||||
AssertLockHeld(wallet.cs_wallet);
|
AssertLockHeld(wallet.cs_wallet);
|
||||||
UniValue lastprocessedblock{UniValue::VOBJ};
|
UniValue lastprocessedblock{UniValue::VOBJ};
|
||||||
|
|||||||
@@ -260,7 +260,7 @@ static OutputType GetOutputType(TxoutType type, bool is_from_p2sh)
|
|||||||
// Fetch and validate the coin control selected inputs.
|
// Fetch and validate the coin control selected inputs.
|
||||||
// Coins could be internal (from the wallet) or external.
|
// Coins could be internal (from the wallet) or external.
|
||||||
util::Result<PreSelectedInputs> FetchSelectedInputs(const CWallet& wallet, const CCoinControl& coin_control,
|
util::Result<PreSelectedInputs> FetchSelectedInputs(const CWallet& wallet, const CCoinControl& coin_control,
|
||||||
const CoinSelectionParams& coin_selection_params) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
|
const CoinSelectionParams& coin_selection_params)
|
||||||
{
|
{
|
||||||
PreSelectedInputs result;
|
PreSelectedInputs result;
|
||||||
const bool can_grind_r = wallet.CanGrindR();
|
const bool can_grind_r = wallet.CanGrindR();
|
||||||
|
|||||||
@@ -1366,13 +1366,13 @@ void CWallet::MarkConflicted(const uint256& hashBlock, int conflicting_height, c
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CWallet::RecursiveUpdateTxState(const uint256& tx_hash, const TryUpdatingStateFn& try_updating_state) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) {
|
void CWallet::RecursiveUpdateTxState(const uint256& tx_hash, const TryUpdatingStateFn& try_updating_state) {
|
||||||
// Do not flush the wallet here for performance reasons
|
// Do not flush the wallet here for performance reasons
|
||||||
WalletBatch batch(GetDatabase(), false);
|
WalletBatch batch(GetDatabase(), false);
|
||||||
RecursiveUpdateTxState(&batch, tx_hash, try_updating_state);
|
RecursiveUpdateTxState(&batch, tx_hash, try_updating_state);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CWallet::RecursiveUpdateTxState(WalletBatch* batch, const uint256& tx_hash, const TryUpdatingStateFn& try_updating_state) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) {
|
void CWallet::RecursiveUpdateTxState(WalletBatch* batch, const uint256& tx_hash, const TryUpdatingStateFn& try_updating_state) {
|
||||||
std::set<uint256> todo;
|
std::set<uint256> todo;
|
||||||
std::set<uint256> done;
|
std::set<uint256> done;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user