Page MenuHomePhabricator

Make use of ADDR_SOFT_CAP outside just the seeder test suite
ClosedPublic

Authored by nakihito on Apr 8 2020, 01:40.

Details

Summary

There is already a variable that does this in the node software, but it
cannot be included in the seeder without building the net.h with the
rest of the seeder. Thus expanding the use of ADDR_SOFT_CAP outside
of just the test suite is a better solution.

Test Plan
ninja
ninja check-bitcoin-seeder

Diff Detail

Repository
rABC Bitcoin ABC
Branch
MaxAddrsConstant
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 10211
Build 18247: Default Diff Build & Tests
Build 18246: arc lint + arc unit

Event Timeline

Owners added a reviewer: Restricted Owners Package.Apr 8 2020, 01:40
jasonbcox requested changes to this revision.Apr 8 2020, 20:13
jasonbcox added a subscriber: jasonbcox.
jasonbcox added inline comments.
src/seeder/test/p2p_messaging_tests.cpp
107 ↗(On Diff #18686)

This should be the hint that this isn't a maximum number of addresses per message. Just because they happen to be the same number, doesn't mean they're the same thing (or even related at all).

Use a name of the constant that is relevent to the seeder.

nakihito retitled this revision from Add a constant for the maximum addrs that can be received to Make use of ADDR_SOFT_CAP outside just the seeder test suite.Apr 10 2020, 18:25
nakihito edited the summary of this revision. (Show Details)
jasonbcox requested changes to this revision.Apr 11 2020, 00:08
jasonbcox added inline comments.
src/seeder/test/p2p_messaging_tests.cpp
106 ↗(On Diff #18717)

Keeping this comment with ADDR_SOFT_CAP would be useful, since we don't know why it's a "soft cap"

This revision is now accepted and ready to land.Apr 14 2020, 01:04