mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-21 07:39:08 +01:00
Merge #18023: Fix some asmap issues
c86bc14408Make asmap Interpret tolerant of malicious map data (Pieter Wuille)38c2395d7aUse ASNs for mapped IPv4 addresses correctly (Pieter Wuille)6f8c937312Mark asmap const in statistics code (Pieter Wuille)d58bcdc4b5Avoid asmap copies in initialization (Pieter Wuille) Pull request description: Here are a few things to improve in the asmap implementation. The first two commits are just code improvements. The last one is a bugfix (the exsting code wouldn't correctly apply ASN lookups to mapped/embedded IPv4 addresses). ACKs for top commit: practicalswift: ACKc86bc14408-- patch looks correct naumenkogs: utACKc86bc14laanwj: ACKc86bc14408jonatack: ACKc86bc14408code looks correct, built/ran tests, bitcoind with -asmap pointed to asmap/demo.map Tree-SHA512: 1036f43152754d621bfbecfd3b7c7276e4670598fcaed42a3d275e51fa2cf3653e2c9e9cfa714f6c7719362541510e92171e076ac4169b55a0cc8908b2d514c0
This commit is contained in:
@@ -1835,8 +1835,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");
|
||||
|
||||
Reference in New Issue
Block a user