@@ -60,24 +60,24 @@ class BanMan
60
60
public:
61
61
~BanMan ();
62
62
BanMan (fs::path ban_file, CClientUIInterface* client_interface, int64_t default_ban_time);
63
- void Ban (const CNetAddr& net_addr, int64_t ban_time_offset = 0 , bool since_unix_epoch = false );
64
- void Ban (const CSubNet& sub_net, int64_t ban_time_offset = 0 , bool since_unix_epoch = false );
65
- void Discourage (const CNetAddr& net_addr);
66
- void ClearBanned ();
63
+ void Ban (const CNetAddr& net_addr, int64_t ban_time_offset = 0 , bool since_unix_epoch = false ) EXCLUSIVE_LOCKS_REQUIRED(!m_banned_mutex) ;
64
+ void Ban (const CSubNet& sub_net, int64_t ban_time_offset = 0 , bool since_unix_epoch = false ) EXCLUSIVE_LOCKS_REQUIRED(!m_banned_mutex) ;
65
+ void Discourage (const CNetAddr& net_addr) EXCLUSIVE_LOCKS_REQUIRED(!m_banned_mutex) ;
66
+ void ClearBanned () EXCLUSIVE_LOCKS_REQUIRED(!m_banned_mutex) ;
67
67
68
68
// ! Return whether net_addr is banned
69
- bool IsBanned (const CNetAddr& net_addr);
69
+ bool IsBanned (const CNetAddr& net_addr) EXCLUSIVE_LOCKS_REQUIRED(!m_banned_mutex) ;
70
70
71
71
// ! Return whether sub_net is exactly banned
72
- bool IsBanned (const CSubNet& sub_net);
72
+ bool IsBanned (const CSubNet& sub_net) EXCLUSIVE_LOCKS_REQUIRED(!m_banned_mutex) ;
73
73
74
74
// ! Return whether net_addr is discouraged.
75
- bool IsDiscouraged (const CNetAddr& net_addr);
75
+ bool IsDiscouraged (const CNetAddr& net_addr) EXCLUSIVE_LOCKS_REQUIRED(!m_banned_mutex) ;
76
76
77
- bool Unban (const CNetAddr& net_addr);
78
- bool Unban (const CSubNet& sub_net);
79
- void GetBanned (banmap_t & banmap);
80
- void DumpBanlist ();
77
+ bool Unban (const CNetAddr& net_addr) EXCLUSIVE_LOCKS_REQUIRED(!m_banned_mutex) ;
78
+ bool Unban (const CSubNet& sub_net) EXCLUSIVE_LOCKS_REQUIRED(!m_banned_mutex) ;
79
+ void GetBanned (banmap_t & banmap) EXCLUSIVE_LOCKS_REQUIRED(!m_banned_mutex) ;
80
+ void DumpBanlist () EXCLUSIVE_LOCKS_REQUIRED(!m_banned_mutex) ;
81
81
82
82
private:
83
83
void LoadBanlist () EXCLUSIVE_LOCKS_REQUIRED(!m_banned_mutex);
0 commit comments