forked from dogecoin/dogecoin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate ASN bucketing in Addrman and add tests
Instead of using /16 netgroups to bucket nodes in Addrman for connection diversification, ASN, which better represents an actor in terms of network-layer infrastructure, is used. For testing, asmap.raw is used. It represents a minimal asmap needed for testing purposes. Cherry-picked from: ec45646
- Loading branch information
1 parent
177498b
commit 5630e66
Showing
11 changed files
with
756 additions
and
208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,7 +71,8 @@ JSON_TEST_FILES = \ | |
test/data/tx_valid.json \ | ||
test/data/sighash.json | ||
|
||
RAW_TEST_FILES = | ||
RAW_TEST_FILES = \ | ||
test/data/asmap.raw | ||
|
||
GENERATED_TEST_FILES = $(JSON_TEST_FILES:.json=.json.h) $(RAW_TEST_FILES:.raw=.raw.h) | ||
|
||
|
@@ -225,8 +226,8 @@ endif | |
%.raw.h: %.raw | ||
@$(MKDIR_P) $(@D) | ||
@{ \ | ||
echo "static unsigned const char $(*F)[] = {" && \ | ||
$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' && \ | ||
echo "static unsigned const char $(*F)_raw[] = {" && \ | ||
$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' && \ | ||
echo "};"; \ | ||
} > "[email protected]" && mv -f "[email protected]" "$@" | ||
@echo "Generated $@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.