[asmap] Make DecodeAsmap() a utility function

DecopeAsmap is a pure utility function and doesn't have any
dependencies on addrman, so move it to util/asmap.

Reviewer hint: use:

`git diff --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space`
This commit is contained in:
John Newbery
2021-09-01 12:41:47 +01:00
parent bfdf4ef334
commit 9fd5618610
5 changed files with 43 additions and 35 deletions

View File

@@ -1189,7 +1189,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
InitError(strprintf(_("Could not find asmap file %s"), asmap_path));
return false;
}
asmap = CAddrMan::DecodeAsmap(asmap_path);
asmap = DecodeAsmap(asmap_path);
if (asmap.size() == 0) {
InitError(strprintf(_("Could not parse asmap file %s"), asmap_path));
return false;