mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-17 19:03:42 +01:00
pytest: test for correct wallet balances, re-enable penalty test.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
ae8b459932
commit
f73ea5d0ba
@ -2041,10 +2041,15 @@ class LightningDTests(BaseLightningDTests):
|
||||
# 100 blocks later, all resolved.
|
||||
bitcoind.generate_block(100)
|
||||
|
||||
# FIXME: Test wallet balance...
|
||||
l2.daemon.wait_for_log('onchaind complete, forgetting peer')
|
||||
|
||||
@unittest.skip("flaky test causing CI fails too often")
|
||||
outputs = l2.rpc.listfunds()['outputs']
|
||||
assert [o['status'] for o in outputs] == ['confirmed'] * 2
|
||||
# Allow some lossage for fees.
|
||||
assert sum(o['value'] for o in outputs) < 10**6
|
||||
assert sum(o['value'] for o in outputs) > 10**6 - 15000
|
||||
|
||||
@unittest.skipIf(not DEVELOPER, "needs DEVELOPER=1")
|
||||
def test_penalty_outhtlc(self):
|
||||
"""Test penalty transaction with an outgoing HTLC"""
|
||||
# First we need to get funds to l2, so suppress after second.
|
||||
@ -2104,9 +2109,14 @@ class LightningDTests(BaseLightningDTests):
|
||||
# 100 blocks later, all resolved.
|
||||
bitcoind.generate_block(100)
|
||||
|
||||
# FIXME: Test wallet balance...
|
||||
wait_forget_channels(l2)
|
||||
|
||||
outputs = l2.rpc.listfunds()['outputs']
|
||||
assert [o['status'] for o in outputs] == ['confirmed'] * 3
|
||||
# Allow some lossage for fees.
|
||||
assert sum(o['value'] for o in outputs) < 10**6
|
||||
assert sum(o['value'] for o in outputs) > 10**6 - 15000
|
||||
|
||||
@unittest.skipIf(not DEVELOPER, "needs DEVELOPER=1")
|
||||
def test_onchain_feechange(self):
|
||||
"""Onchain handling when we restart with different fees"""
|
||||
|
Loading…
Reference in New Issue
Block a user