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
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/34204.
See the guideline for information on the review process.
If your review is incorrectly listed, please copy-paste <!–meta-tag:bot-skip–> into the comment that the bot should ignore.
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.