Fix nonsensical -noasmap behavior

Instead of failing with "fread failed: iostream error" error when -noasmap is
specified, just don't load an asmap file.
This commit is contained in:
Ryan Ofsky
2024-12-19 13:24:48 -05:00
parent b6ab350806
commit 6e8e7f433f
2 changed files with 8 additions and 1 deletions

View File

@@ -1433,7 +1433,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
// Read asmap file if configured
std::vector<bool> asmap;
if (args.IsArgSet("-asmap")) {
if (args.IsArgSet("-asmap") && !args.IsArgNegated("-asmap")) {
fs::path asmap_path = args.GetPathArg("-asmap", DEFAULT_ASMAP_FILENAME);
if (!asmap_path.is_absolute()) {
asmap_path = args.GetDataDirNet() / asmap_path;