diff --git a/Unmaintained/drain/drain.py b/Unmaintained/drain/drain.py index f92eb4c..4f6ae6e 100755 --- a/Unmaintained/drain/drain.py +++ b/Unmaintained/drain/drain.py @@ -351,7 +351,7 @@ def try_for_htlc_fee(payload, peer_id, amount, chunk, spendable_before): def read_params(command: str, scid: str, percentage: float, chunks: int, - retry_for: int, maxfeepercent: float, exemptfee: int): + retry_for: int, maxfeepercent: float, exemptfee: Millisatoshi): # check parameters if command != 'drain' and command != 'fill' and command != 'setbalance': @@ -466,7 +466,7 @@ def execute(payload: dict): @plugin.method("drain") def drain(plugin, scid: str, percentage: float = 100, chunks: int = 0, retry_for: int = 60, - maxfeepercent: float = 0.5, exemptfee: int = 5000): + maxfeepercent: float = 0.5, exemptfee: Millisatoshi = Millisatoshi(5000)): """Draining channel liquidity with circular payments. Percentage defaults to 100, resulting in an empty channel. diff --git a/Unmaintained/drain/test_drain.py b/Unmaintained/drain/test_drain.py index e473126..2366100 100644 --- a/Unmaintained/drain/test_drain.py +++ b/Unmaintained/drain/test_drain.py @@ -1,4 +1,5 @@ from pyln.testing.fixtures import * # noqa: F401,F403 +from pyln.testing.utils import DEVELOPER from pyln.client import RpcError from .utils import get_ours, get_theirs, wait_ours, wait_for_all_htlcs import os @@ -23,6 +24,7 @@ def test_plugin_starts(node_factory): l1.start() +@unittest.skipIf(not DEVELOPER, "slow gossip, needs DEVELOPER=1") def test_drain_and_refill(node_factory, bitcoind): # Scenario: first drain then refill # @@ -82,6 +84,7 @@ def test_drain_and_refill(node_factory, bitcoind): assert(get_theirs(l1, scid12) < theirs_before * 0.05) +@unittest.skipIf(not DEVELOPER, "slow gossip, needs DEVELOPER=1") def test_fill_and_drain(node_factory, bitcoind): # Scenario: first fill of an empty channel and drain afterwards. # @@ -130,6 +133,7 @@ def test_fill_and_drain(node_factory, bitcoind): assert(get_theirs(l1, scid12) < theirs_before * 0.05) # account some reserves +@unittest.skipIf(not DEVELOPER, "slow gossip, needs DEVELOPER=1") def test_setbalance(node_factory, bitcoind): # SETUP: a basic circular setup to run setbalance tests # @@ -190,6 +194,7 @@ def balance(node, node_a, scid_a, node_b, scid_b, node_c): wait_for_all_htlcs([node, node_a, node_b]) +@unittest.skipIf(not DEVELOPER, "slow gossip, needs DEVELOPER=1") def test_drain_chunks(node_factory, bitcoind): # SETUP: a small mesh that enables testing chunks # @@ -272,6 +277,7 @@ def test_drain_chunks(node_factory, bitcoind): assert(get_theirs(l1, scid41) > amount * 0.9) +@unittest.skipIf(not DEVELOPER, "slow gossip, needs DEVELOPER=1") def test_fill_chunks(node_factory, bitcoind): # SETUP: a small mesh that enables testing chunks # diff --git a/Unmaintained/feeadjuster/test_feeadjuster.py b/Unmaintained/feeadjuster/test_feeadjuster.py index 9efa77c..a2b8346 100644 --- a/Unmaintained/feeadjuster/test_feeadjuster.py +++ b/Unmaintained/feeadjuster/test_feeadjuster.py @@ -4,7 +4,7 @@ import string import unittest from pyln.testing.fixtures import * # noqa: F401,F403 -from pyln.testing.utils import wait_for +from pyln.testing.utils import DEVELOPER, wait_for plugin_path = os.path.join(os.path.dirname(__file__), "feeadjuster.py") @@ -70,6 +70,7 @@ def sync_gossip(nodes, scids): wait_for(lambda: node.rpc.listchannels(scid) == n.rpc.listchannels(scid)) +@unittest.skipIf(not DEVELOPER, "Too slow without fast gossip") def test_feeadjuster_adjusts(node_factory): """ A rather simple network: @@ -139,6 +140,7 @@ def test_feeadjuster_adjusts(node_factory): f'Adjusted fees of {scid_B} with a ratio of 0.2']) +@unittest.skipIf(not DEVELOPER, "Too slow without fast gossip") def test_feeadjuster_imbalance(node_factory): """ A rather simple network: @@ -215,6 +217,7 @@ def test_feeadjuster_imbalance(node_factory): wait_for_fees(l2, scids, default_fees[0]) +@unittest.skipIf(not DEVELOPER, "Too slow without fast gossip") def test_feeadjuster_big_enough_liquidity(node_factory): """ A rather simple network: @@ -289,6 +292,7 @@ def test_feeadjuster_big_enough_liquidity(node_factory): wait_for_not_fees(l2, scids, default_fees[0]) +@unittest.skipIf(not DEVELOPER, "Too slow without fast gossip") def test_feeadjuster_median(node_factory): """ A rather simple network: diff --git a/Unmaintained/historian/poetry.lock b/Unmaintained/historian/poetry.lock index 1cdc9df..eb6015d 100644 --- a/Unmaintained/historian/poetry.lock +++ b/Unmaintained/historian/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.4.1 and should not be changed by hand. +# This file is automatically @generated by Poetry and should not be changed by hand. [[package]] name = "asn1crypto" @@ -390,21 +390,6 @@ files = [ {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, ] -[[package]] -name = "inotify" -version = "0.2.10" -description = "An adapter to Linux kernel support for inotify directory-watching." -category = "main" -optional = false -python-versions = "*" -files = [ - {file = "inotify-0.2.10-py2-none-any.whl", hash = "sha256:397f8785450e41f606fe4eb6f5e8e0a1c70b354b56495225fc6c6fe7e07db0c9"}, - {file = "inotify-0.2.10.tar.gz", hash = "sha256:974a623a338482b62e16d4eb705fb863ed33ec178680fc3e96ccdf0df6c02a07"}, -] - -[package.dependencies] -nose = "*" - [[package]] name = "itsdangerous" version = "2.1.2" @@ -540,19 +525,6 @@ files = [ {file = "more_itertools-9.0.0-py3-none-any.whl", hash = "sha256:250e83d7e81d0c87ca6bd942e6aeab8cc9daa6096d12c5308f3f92fa5e5c1f41"}, ] -[[package]] -name = "nose" -version = "1.3.7" -description = "nose extends unittest to make testing easier" -category = "main" -optional = false -python-versions = "*" -files = [ - {file = "nose-1.3.7-py2-none-any.whl", hash = "sha256:dadcddc0aefbf99eea214e0f1232b94f2fa9bd98fa8353711dacb112bfcbbb2a"}, - {file = "nose-1.3.7-py3-none-any.whl", hash = "sha256:9ff7c6cc443f8c51994b34a667bbcf45afd6d945be7477b52e97516fd17c53ac"}, - {file = "nose-1.3.7.tar.gz", hash = "sha256:f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98"}, -] - [[package]] name = "packaging" version = "22.0" @@ -999,4 +971,4 @@ testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools" [metadata] lock-version = "2.0" python-versions = "^3.7" -content-hash = "bd763b3fec77a5c059bcc1f6207339efdb2df96cc9539e07456bff00abb70e51" +content-hash = "5dfdd4459dfffcf602f5f4b1bb6aedeb5da484cb758671a0ca5e4ee3ea2a2e11" diff --git a/Unmaintained/historian/pyproject.toml b/Unmaintained/historian/pyproject.toml index 69cde1e..e768b77 100644 --- a/Unmaintained/historian/pyproject.toml +++ b/Unmaintained/historian/pyproject.toml @@ -8,7 +8,6 @@ license = "MIT" [tool.poetry.dependencies] python = "^3.7" pyln-client = "0.11.1" -inotify = "^0.2.10" [tool.poetry.dev-dependencies] pyln-testing = "0.11.1" diff --git a/Unmaintained/jitrebalance/test_jitrebalance.py b/Unmaintained/jitrebalance/test_jitrebalance.py index 0be989e..f071c99 100644 --- a/Unmaintained/jitrebalance/test_jitrebalance.py +++ b/Unmaintained/jitrebalance/test_jitrebalance.py @@ -1,6 +1,6 @@ from pyln.client import RpcError from pyln.testing.fixtures import * # noqa: F401, F403 -from pyln.testing.utils import wait_for +from pyln.testing.utils import wait_for, DEVELOPER import os import time import pytest @@ -13,6 +13,7 @@ hold_plugin = os.path.join(currdir, 'tests/hold_htlcs.py') reject_plugin = os.path.join(currdir, 'tests/refuse_htlcs.py') +@unittest.skipIf(not DEVELOPER, "gossip is too slow if we're not in developer mode") def test_simple_rebalance(node_factory): """Simple rebalance that routes along a cycle to enable the original payment @@ -81,6 +82,7 @@ def test_simple_rebalance(node_factory): assert l2.daemon.is_in_log('Succesfully re-filled outgoing capacity') +@unittest.skipIf(not DEVELOPER, "gossip is too slow if we're not in developer mode") def test_rebalance_failure(node_factory): """Same setup as the first test : @@ -156,6 +158,7 @@ def test_rebalance_failure(node_factory): assert l2.daemon.is_in_log('Timed out while trying to rebalance') +@unittest.skipIf(not DEVELOPER, "gossip is too slow if we're not in developer mode") def test_issue_88(node_factory): """Reproduce issue #88: crash due to unconfirmed channel. diff --git a/Unmaintained/noise/test_chat.py b/Unmaintained/noise/test_chat.py index 26b8d21..ecf4b93 100644 --- a/Unmaintained/noise/test_chat.py +++ b/Unmaintained/noise/test_chat.py @@ -3,7 +3,7 @@ from flaky import flaky from pprint import pprint from pyln.client import RpcError from pyln.testing.fixtures import * # noqa: F401,F403 -from pyln.testing.utils import wait_for +from pyln.testing.utils import DEVELOPER, wait_for import hashlib import os import pytest @@ -33,6 +33,7 @@ def test_sendmsg_success(node_factory, executor): @flaky # since we cannot force a payment to take a specific route +@unittest.skipIf(not DEVELOPER, "Fails often") @unittest.skipIf(True, "Just not stable") def test_sendmsg_retry(node_factory, executor): """Fail a sendmsg using a cheap route, and check that it retries. diff --git a/Unmaintained/probe/test_probe.py b/Unmaintained/probe/test_probe.py index 4a6580d..ee54d91 100644 --- a/Unmaintained/probe/test_probe.py +++ b/Unmaintained/probe/test_probe.py @@ -1,6 +1,7 @@ import unittest import os from pyln.testing.fixtures import * # noqa: F401,F403 +from pyln.testing.utils import DEVELOPER plugin_path = os.path.join(os.path.dirname(__file__), "probe.py") @@ -17,6 +18,7 @@ def test_probe_starts(node_factory): l1.start() +@unittest.skipIf(not DEVELOPER, "Gossip is slow") def test_probe(node_factory): l1, l2, l3, l4 = node_factory.line_graph( 4, @@ -34,6 +36,7 @@ def test_probe(node_factory): assert(res['failcode'] == 16399) +@unittest.skipIf(not DEVELOPER, "Gossip is slow") def test_route_unreachable(node_factory): l1, l2, l3, l4 = node_factory.line_graph( 4, diff --git a/Unmaintained/summary/test_summary.py b/Unmaintained/summary/test_summary.py index e4f8e39..364cfed 100644 --- a/Unmaintained/summary/test_summary.py +++ b/Unmaintained/summary/test_summary.py @@ -5,7 +5,7 @@ import os from pyln.client import Plugin from pyln.testing.fixtures import * # noqa: F401,F403 -from pyln.testing.utils import wait_for +from pyln.testing.utils import DEVELOPER, wait_for from .summary_avail import trace_availability @@ -264,6 +264,7 @@ def test_summary_opts(directory): assert(o in help_out) +@unittest.skipIf(not DEVELOPER, "We need fast gossip for line_graph") def test_summary_exclude(node_factory): l1, l2 = node_factory.line_graph(2, opts=pluginopt)