logging: asmap logging and #include fixups

- move asmap #includes to sorted positions in addrman and init (move-only)

- remove redundant quotes in asmap InitError, update test

- remove full stops from asmap logging to be consistent with debug logging,
  update tests
This commit is contained in:
Jon Atack
2019-12-29 18:54:33 +01:00
parent dcaf543ba0
commit 819fb5549b
4 changed files with 17 additions and 18 deletions

View File

@@ -47,11 +47,11 @@
#include <txdb.h>
#include <txmempool.h>
#include <ui_interface.h>
#include <util/asmap.h>
#include <util/moneystr.h>
#include <util/system.h>
#include <util/threadnames.h>
#include <util/translation.h>
#include <util/asmap.h>
#include <validation.h>
#include <hash.h>
@@ -1840,14 +1840,14 @@ bool AppInitMain(NodeContext& node)
}
std::vector<bool> asmap = CAddrMan::DecodeAsmap(asmap_path);
if (asmap.size() == 0) {
InitError(strprintf(_("Could not parse asmap file '%s'").translated, asmap_path));
InitError(strprintf(_("Could not parse asmap file %s").translated, asmap_path));
return false;
}
const uint256 asmap_version = SerializeHash(asmap);
node.connman->SetAsmap(std::move(asmap));
LogPrintf("Using asmap version %s for IP bucketing.\n", asmap_version.ToString());
LogPrintf("Using asmap version %s for IP bucketing\n", asmap_version.ToString());
} else {
LogPrintf("Using /16 prefix for IP bucketing.\n");
LogPrintf("Using /16 prefix for IP bucketing\n");
}
// ********************************************************* Step 13: finished