Avoid asmap copies in initialization

This commit is contained in:
Pieter Wuille
2020-01-29 13:55:40 -08:00
parent 7fcaa8291c
commit d58bcdc4b5
2 changed files with 2 additions and 2 deletions

View File

@@ -1832,8 +1832,8 @@ bool AppInitMain(NodeContext& node)
InitError(strprintf(_("Could not find or parse specified asmap: '%s'").translated, asmap_path));
return false;
}
node.connman->SetAsmap(asmap);
const uint256 asmap_version = SerializeHash(asmap);
node.connman->SetAsmap(std::move(asmap));
LogPrintf("Using asmap version %s for IP bucketing.\n", asmap_version.ToString());
} else {
LogPrintf("Using /16 prefix for IP bucketing.\n");