Moves some constants from seeder/dns_tests.cpp to dns.h.
Details
- Reviewers
Fabien - Group Reviewers
Restricted Owners Package (Owns No Changed Paths) Restricted Project - Commits
- rSTAGING0da65ecee208: Add constants to dns.h
rABC0da65ecee208: Add constants to dns.h
ninja ninja check-bitcoin-seeder
Diff Detail
- Repository
- rABC Bitcoin ABC
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
src/seeder/dns.cpp | ||
---|---|---|
77 ↗ | (On Diff #16859) | Please double check that this won't cause issues later... |
85 ↗ | (On Diff #16859) | Please mention the null character so the -3 makes sense |
101 ↗ | (On Diff #16859) | ... here for example |
142 ↗ | (On Diff #16859) | Now a <260 chars>.pwned name will be fine. |
src/seeder/dns.h | ||
14 ↗ | (On Diff #16859) | I think what you want here is constexpr |
src/seeder/dns.cpp | ||
---|---|---|
77 ↗ | (On Diff #16888) | Whatever the type is, if you go from signed to unsigned you need to be sure that it is safe when using the - operator (which is done a few lines below) because this is a behavior change. |
130 ↗ | (On Diff #16888) | Mind changing k to ok while you're at it ? |
142 ↗ | (On Diff #16888) | There is a type for pointer arithmetic: https://en.cppreference.com/w/cpp/types/ptrdiff_t |
src/seeder/dns.h | ||
14 ↗ | (On Diff #16888) | 2 questions:
|
Removed static and changed const to constexpr. Also undid changes to variables in parse_name() and write_name(). Changed MAX_LABEL_LENGTH from size_t to int.