Skip to content

Conversation

@0xB10C
Copy link
Contributor

@0xB10C 0xB10C commented Mar 12, 2024

A few, small follow-ups to #29007. See commit messages for details.

@DrahtBot
Copy link
Contributor

DrahtBot commented Mar 12, 2024

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK stratospher, mzumsande, maflcko

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #29641 (scripted-diff: Use LogInfo/LogDebug over LogPrintf/LogPrint by maflcko)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@DrahtBot DrahtBot added the Tests label Mar 12, 2024
@0xB10C
Copy link
Contributor Author

0xB10C commented Mar 12, 2024

Since addpeeraddress can currently fail to add an address to the tried table but will report { success: true }, it makes sense to get that fixed with #28998 first before this PR, especially the first commit, is ready for review. The other two commits are minor and can wait.

src/addrdb.cpp Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit (feel free to ignore): If you want, you can also replace LogPrintf with LogInfo for clarity, while touching this file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not doing this for now as I think this is slightly out-of-scope of this PR even if I touch the file.

0xB10C added 3 commits March 23, 2024 15:33
The addpeeraddress calls can fail due to collisions. As we are using a
deteministic addrman, they won't fail with the current bucket/position
calculation. However, if the calculation is changed, they might collide
and fail silently causing tests using `seed_addrman()` to fail.

Assert that the addpeeraddress calls are successful.
Just having deterministic is enough. See bitcoin#29007 (comment)
@0xB10C 0xB10C force-pushed the 2024-03-29007-follow-ups branch from 777fb3d to 9a44a20 Compare March 23, 2024 14:43
@0xB10C
Copy link
Contributor Author

0xB10C commented Mar 23, 2024

With #28998 merged, this PR is now ready-for-review. I've also rebased it.

@0xB10C 0xB10C marked this pull request as ready for review March 23, 2024 14:44
Copy link
Contributor

@stratospher stratospher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested ACK 9a44a20.

you can also include the check in test/functional/feature_asmap.py since addpeeraddress + deterministic addrman is present there too.

Copy link
Contributor

@mzumsande mzumsande left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review ACK 9a44a20

@maflcko
Copy link
Member

maflcko commented Mar 25, 2024

lgtm ACK 9a44a20

@fanquake fanquake merged commit f22bca6 into bitcoin:master Mar 25, 2024
@0xB10C 0xB10C deleted the 2024-03-29007-follow-ups branch March 25, 2024 11:20
@bitcoin bitcoin locked and limited conversation to collaborators Mar 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants