Skip to content

Commit 716de29

Browse files
committed
Make m_cached_blocks_path mutable. Make ArgsManager::GetBlocksDirPath() const.
1 parent be41716 commit 716de29

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/util/system.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ std::optional<unsigned int> ArgsManager::GetArgFlags(const std::string& name) co
388388
return std::nullopt;
389389
}
390390

391-
const fs::path& ArgsManager::GetBlocksDirPath()
391+
const fs::path& ArgsManager::GetBlocksDirPath() const
392392
{
393393
LOCK(cs_args);
394394
fs::path& path = m_cached_blocks_path;

src/util/system.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ class ArgsManager
195195
std::map<OptionsCategory, std::map<std::string, Arg>> m_available_args GUARDED_BY(cs_args);
196196
bool m_accept_any_command GUARDED_BY(cs_args){true};
197197
std::list<SectionInfo> m_config_sections GUARDED_BY(cs_args);
198-
fs::path m_cached_blocks_path GUARDED_BY(cs_args);
198+
mutable fs::path m_cached_blocks_path GUARDED_BY(cs_args);
199199
mutable fs::path m_cached_datadir_path GUARDED_BY(cs_args);
200200
mutable fs::path m_cached_network_datadir_path GUARDED_BY(cs_args);
201201

@@ -266,7 +266,7 @@ class ArgsManager
266266
*
267267
* @return Blocks path which is network specific
268268
*/
269-
const fs::path& GetBlocksDirPath();
269+
const fs::path& GetBlocksDirPath() const;
270270

271271
/**
272272
* Get data directory path

0 commit comments

Comments
 (0)