Page MenuHomePhabricator

[tests] Update Unit Test for addrman.h/addrman.cpp
ClosedPublic

Authored by deadalnix on Oct 2 2018, 12:12.

Details

Summary

Add test for adding multiple addresses to address manager
Clean up unnecessary modulo operations
Add test for GetNewBucket's alternate method signature

This is a backport of Core PR10287

Test Plan
make check

Diff Detail

Repository
rABC Bitcoin ABC
Branch
updatetest
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 3479
Build 5034: Bitcoin ABC Buildbot (legacy)
Build 5033: arc lint + arc unit

Event Timeline

jasonbcox requested changes to this revision.Oct 3 2018, 04:35
jasonbcox added a subscriber: jasonbcox.
jasonbcox added inline comments.
src/test/addrman_tests.cpp
396

How did this value change, yet the test still passes? I don't see any logic changes.

This revision now requires changes to proceed.Oct 3 2018, 04:35
deadalnix marked an inline comment as done.
deadalnix added inline comments.
src/test/addrman_tests.cpp
396

The number of collision is different because the loop above changed.

jasonbcox added inline comments.
src/test/addrman_tests.cpp
396

Ah got it

This revision is now accepted and ready to land.Oct 4 2018, 19:03
This revision was automatically updated to reflect the committed changes.