From 54a2ae16551e2b08cdb0b2291fb6ff3d3445f62b Mon Sep 17 00:00:00 2001 From: Cryp Toon Date: Thu, 14 Mar 2024 21:34:03 +0100 Subject: [PATCH] Increase delta in blockcount unittests --- tests/test_services.py | 2 +- tests/test_wallets.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_services.py b/tests/test_services.py index a6dc372a..19d56dbb 100644 --- a/tests/test_services.py +++ b/tests/test_services.py @@ -609,7 +609,7 @@ def test_service_blockcount(self): n_blocks = None for provider in srv.results: if n_blocks is not None: - self.assertAlmostEqual(srv.results[provider], n_blocks, delta=5000 if nw == 'testnet' else 3, + self.assertAlmostEqual(srv.results[provider], n_blocks, delta=10000 if nw == 'testnet' else 3, msg="Network %s, provider %s value %d != %d" % (nw, provider, srv.results[provider], n_blocks)) n_blocks = srv.results[provider] diff --git a/tests/test_wallets.py b/tests/test_wallets.py index 9aa09b57..547960c4 100644 --- a/tests/test_wallets.py +++ b/tests/test_wallets.py @@ -2272,7 +2272,7 @@ def test_wallet_anti_fee_sniping(self): t = w.send_to('tb1qrjtz22q59e76mhumy0p586cqukatw5vcd0xvvz', 123456) block_height = Service(network='testnet').blockcount() # Bitaps and Bitgo return incorrect blockcount for testnet, so set delta to 5000 - self.assertAlmostEqual(t.locktime, block_height+1, delta=5000) + self.assertAlmostEqual(t.locktime, block_height+1, delta=10000) w2 = wallet_create_or_open('antifeesnipingtestwallet2', network='testnet', anti_fee_sniping=True) w2.utxo_add(w2.get_key().address, 1234567, os.urandom(32).hex(), 1)