Revert changes in drain, historian, jitrebalance, probe, summary, noise, feeadjuster

This commit is contained in:
fmhoeger
2024-02-03 21:28:46 -06:00
committed by mergify[bot]
parent 08c2c24e46
commit 38402c41a1
9 changed files with 26 additions and 37 deletions

View File

@@ -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.

View File

@@ -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
#