Add TimeOffsets helper class

This helper class is an alternative to CMedianFilter, but without a
lot of the special logic and exceptions that we needed while it was
still used for consensus.
This commit is contained in:
stickies-v
2024-03-07 11:23:00 +00:00
parent 55361a15d1
commit ee178dfcc1
10 changed files with 234 additions and 2 deletions

View File

@ -43,6 +43,10 @@ class MaxTipAgeTest(BitcoinTestFramework):
self.generate(node_miner, 1)
assert_equal(node_ibd.getblockchaininfo()['initialblockdownload'], False)
# reset time to system time so we don't have a time offset with the ibd node the next
# time we connect to it, ensuring TimeOffsets::WarnIfOutOfSync() doesn't output to stderr
node_miner.setmocktime(0)
def run_test(self):
self.log.info("Test IBD with maximum tip age of 24 hours (default).")
self.test_maxtipage(DEFAULT_MAX_TIP_AGE, set_parameter=False)