Due to the mocktime being bumped before the expected time is updated, it could happen that the self-announcement is send with an newer timestamp than what we expect. To fix this, update the expected time before we bump the mocktime.
closes #34159
Due to the mocktime being bumped before the expected time is updated, it could happen that the self-announcement is send with an newer timestamp than what we expect. To fix this, update the expected time before we bump the mocktime.
closes #34159
Due to the mocktime being bumped before the expected time is updated,
it could happen that the self-announcement is send with an newer
timestamp than what we expect. To fix this, update the expected time
before we bump the mocktime.
closes #34159
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/34204.
<!--021abf342d371248e50ceaed478a90ca-->
See the guideline for information on the review process.
If your review is incorrectly listed, please copy-paste <code><!--meta-tag:bot-skip--></code> into the comment that the bot should ignore.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
I've been testing this with GHA runners by doing 500 instead of 5 extra self-annoucements in the test https://github.com/0xB10C/bitcoin/commit/592be7e13e1ef27b0e6804899d51b8db93521f5f:
will re-run these a couple of times
ACK 31852057ea393e64b7ea2bfabc75a55fda40b786
Tested on macOS - p2p_addr_selfannouncement.py passes.
The fix is sane - set expected time before bumping mocktime to avoid the race where self-announcement could be sent with a timestamp newer than expected.
lgtm ACK 31852057ea393e64b7ea2bfabc75a55fda40b786
utACK 31852057ea393e64b7ea2bfabc75a55fda40b786
Milestone
31.0