diff options
author | Jon Atack <jon@atack.com> | 2019-12-29 18:52:10 +0100 |
---|---|---|
committer | Jon Atack <jon@atack.com> | 2020-03-04 14:24:15 +0100 |
commit | b8d0412b213df18f23bf8677ab94068c6cca9f51 (patch) | |
tree | 0e2d5c7258e12284244995d7f61548b3a1f4d6ee /src | |
parent | 81c38a24975f34e5894efe3d1aaf45ff6a8cee4a (diff) |
config: separate the asmap finding and parsing checks
and update the tests.
Diffstat (limited to 'src')
-rw-r--r-- | src/init.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp index 222e33c1a7..0f56f3881c 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1834,9 +1834,13 @@ bool AppInitMain(NodeContext& node) if (!asmap_path.is_absolute()) { asmap_path = GetDataDir() / asmap_path; } + if (!fs::exists(asmap_path)) { + InitError(strprintf(_("Could not find asmap file %s").translated, asmap_path)); + return false; + } std::vector<bool> asmap = CAddrMan::DecodeAsmap(asmap_path); if (asmap.size() == 0) { - InitError(strprintf(_("Could not find or parse specified asmap: '%s'").translated, asmap_path)); + InitError(strprintf(_("Could not parse asmap file '%s'").translated, asmap_path)); return false; } const uint256 asmap_version = SerializeHash(asmap); |