File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -216,7 +216,7 @@ class ArgsManagerHelper {
216
216
217
217
/* * Determine whether to use config settings in the default section,
218
218
* See also comments around ArgsManager::ArgsManager() below. */
219
- static inline bool UseDefaultSection (const ArgsManager& am, const std::string& arg)
219
+ static inline bool UseDefaultSection (const ArgsManager& am, const std::string& arg) EXCLUSIVE_LOCKS_REQUIRED(am.cs_args)
220
220
{
221
221
return (am.m_network == CBaseChainParams::MAIN || am.m_network_only_args .count (arg) == 0 );
222
222
}
@@ -295,7 +295,7 @@ class ArgsManagerHelper {
295
295
/* Special test for -testnet and -regtest args, because we
296
296
* don't want to be confused by craziness like "[regtest] testnet=1"
297
297
*/
298
- static inline bool GetNetBoolArg (const ArgsManager &am, const std::string& net_arg)
298
+ static inline bool GetNetBoolArg (const ArgsManager &am, const std::string& net_arg) EXCLUSIVE_LOCKS_REQUIRED(am.cs_args)
299
299
{
300
300
std::pair<bool ,std::string> found_result (false ,std::string ());
301
301
found_result = GetArgHelper (am.m_override_args , net_arg, true );
Original file line number Diff line number Diff line change @@ -142,11 +142,11 @@ class ArgsManager
142
142
};
143
143
144
144
mutable CCriticalSection cs_args;
145
- std::map<std::string, std::vector<std::string>> m_override_args;
146
- std::map<std::string, std::vector<std::string>> m_config_args;
147
- std::string m_network;
148
- std::set<std::string> m_network_only_args;
149
- std::map<OptionsCategory, std::map<std::string, Arg>> m_available_args;
145
+ std::map<std::string, std::vector<std::string>> m_override_args GUARDED_BY (cs_args) ;
146
+ std::map<std::string, std::vector<std::string>> m_config_args GUARDED_BY (cs_args) ;
147
+ std::string m_network GUARDED_BY (cs_args) ;
148
+ std::set<std::string> m_network_only_args GUARDED_BY (cs_args) ;
149
+ std::map<OptionsCategory, std::map<std::string, Arg>> m_available_args GUARDED_BY (cs_args) ;
150
150
151
151
bool ReadConfigStream (std::istream& stream, std::string& error, bool ignore_invalid_keys = false );
152
152
You can’t perform that action at this time.
0 commit comments