Skip to content

Commit

Permalink
tests: default to native segwit
Browse files Browse the repository at this point in the history
  • Loading branch information
niftynei committed Dec 2, 2022
1 parent d2d4bed commit 9e3e006
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion contrib/pyln-testing/pyln/testing/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ def openchannel(self, remote_node, capacity=FUNDAMOUNT, addrtype="p2sh-segwit",

return {'address': addr, 'wallettxid': wallettxid, 'fundingtx': res['tx']}

def fundwallet(self, sats, addrtype="p2sh-segwit", mine_block=True):
def fundwallet(self, sats, addrtype="bech32", mine_block=True):
addr = self.rpc.newaddr(addrtype)[addrtype]
txid = self.bitcoin.rpc.sendtoaddress(addr, sats / 10**8)
if mine_block:
Expand Down
8 changes: 4 additions & 4 deletions tests/test_bookkeeper.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,13 +392,13 @@ def _check_events(node, channel_id, exp_events):

# l1 events
exp_events = [('channel_open', open_amt * 1000 + lease_fee, 0),
('onchain_fee', 1408000, 0),
('onchain_fee', 1224000, 0),
('lease_fee', 0, lease_fee),
('journal_entry', 0, invoice_msat)]
_check_events(l1, channel_id, exp_events)

exp_events = [('channel_open', open_amt * 1000, 0),
('onchain_fee', 980000, 0),
('onchain_fee', 796000, 0),
('lease_fee', lease_fee, 0),
('journal_entry', invoice_msat, 0)]
_check_events(l2, channel_id, exp_events)
Expand Down Expand Up @@ -458,7 +458,7 @@ def _check_events(node, channel_id, exp_events):

# l1 events
exp_events = [('channel_open', open_amt * 1000, 0),
('onchain_fee', 5257000, 0),
('onchain_fee', 4567000, 0),
('pushed', 0, push_amt),
('journal_entry', 0, invoice_msat)]
_check_events(l1, channel_id, exp_events)
Expand Down Expand Up @@ -531,7 +531,7 @@ def _check_events(node, channel_id, exp_events):

# l1 events
exp_events = [('channel_open', open_amt * 1000, 0),
('onchain_fee', 5257000, 0),
('onchain_fee', 4567000, 0),
('invoice', 0, invoice_msat)]
_check_events(l1, channel_id, exp_events)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_opening.py
Original file line number Diff line number Diff line change
Expand Up @@ -1420,7 +1420,7 @@ def test_zeroconf_public(bitcoind, node_factory, chainparams):
assert('short_channel_id' not in l2chan)

# Channel is "proposed"
chan_val = 993198000 if chainparams['elements'] else 995673000
chan_val = 993888000 if chainparams['elements'] else 996363000
l1_mvts = [
{'type': 'chain_mvt', 'credit_msat': chan_val, 'debit_msat': 0, 'tags': ['channel_proposed', 'opener']},
{'type': 'channel_mvt', 'credit_msat': 0, 'debit_msat': 20000000, 'tags': ['pushed'], 'fees_msat': '0msat'},
Expand Down

0 comments on commit 9e3e006

Please sign in to comment.