dual-fund: remove anchor assumption for all dual-funded channels

Only add the anchor channel_type if it's negotiated separately!
This commit is contained in:
niftynei
2022-10-19 13:35:45 -05:00
committed by Rusty Russell
parent efe66f9689
commit c9c367d770
10 changed files with 88 additions and 56 deletions

View File

@@ -4,7 +4,8 @@ from pyln.client import Millisatoshi
from db import Sqlite3Db
from fixtures import TEST_NETWORK
from utils import (
sync_blockheight, wait_for, only_one, first_channel_id, TIMEOUT
sync_blockheight, wait_for, only_one, first_channel_id, TIMEOUT,
anchor_expected
)
from pathlib import Path
@@ -332,6 +333,7 @@ def test_bookkeeping_rbf_withdraw(node_factory, bitcoind):
@pytest.mark.openchannel('v2')
@unittest.skipIf(os.getenv('TEST_DB_PROVIDER', 'sqlite3') != 'sqlite3', "turns off bookkeeper at start")
@unittest.skipIf(TEST_NETWORK != 'regtest', "network fees hardcoded")
@pytest.mark.developer("dev-force-features")
def test_bookkeeping_missed_chans_leases(node_factory, bitcoind):
"""
Test that a lease is correctly recorded if bookkeeper was off
@@ -342,6 +344,10 @@ def test_bookkeeping_missed_chans_leases(node_factory, bitcoind):
'lease-fee-base-sat': '100sat', 'lease-fee-basis': 100,
'plugin': str(coin_mvt_plugin),
'disable-plugin': 'bookkeeper'}
if not anchor_expected():
opts['dev-force-features'] = '+21'
l1, l2 = node_factory.get_nodes(2, opts=opts)
open_amt = 500000