@@ -60,24 +60,24 @@ class BanMan
6060public:
6161 ~BanMan ();
6262 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) ;
6767
6868 // ! 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) ;
7070
7171 // ! 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) ;
7373
7474 // ! 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) ;
7676
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) ;
8181
8282private:
8383 void LoadBanlist () EXCLUSIVE_LOCKS_REQUIRED(!m_banned_mutex);
0 commit comments