Page MenuHomePhabricator

[avalanche] make the mocktime increase monotonically
ClosedPublic

Authored by PiRK on Nov 17 2022, 12:49.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC6477e6a9c6c2: [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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Nov 17 2022, 12:49
Fabien retitled this revision from [test] make the mocktime increase monotonically to [avalanche] make the mocktime increase monotonically.Nov 17 2022, 13:09
This revision is now accepted and ready to land.Nov 17 2022, 13:14