HomePhabricator

[avalanche] make the mocktime increase monotonically

Description

[avalanche] make the mocktime increase monotonically

Summary:
The logic was wrong in this test, and the mocktime was set back in time. MAX_ADDR_SEND_DELAY is larger than GETAVAADDR_INTERVAL, so it is not necessary to change the mocktime after already moving the time far enough after the first GETAVAADDR.

I added an assertion to make sure we will get a meaningful error if GETAVAADDR_INTERVAL ever becomes larger than MAX_ADDR_SEND_DELAY.

Test Plan: ninja check-functional

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D12523

Details

Provenance
PiRKAuthored on Nov 17 2022, 12:40
PiRKPushed on Nov 17 2022, 13:58
Reviewer
Restricted Project
Differential Revision
D12523: [avalanche] make the mocktime increase monotonically
Parents
rABCa219f148b4c0: test: Implicitly sync after generate*, unless opted out
Branches
Unknown
Tags
Unknown