mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 07:34:24 +01:00
pytest: Add checks that funding change and to_us get confirmed
Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
committed by
Rusty Russell
parent
5519717144
commit
f341b508e1
@@ -1290,6 +1290,9 @@ class LightningDTests(BaseLightningDTests):
|
|||||||
l1, l2 = self.connect()
|
l1, l2 = self.connect()
|
||||||
|
|
||||||
self.fund_channel(l1, l2, 10**6)
|
self.fund_channel(l1, l2, 10**6)
|
||||||
|
|
||||||
|
# The funding change should be confirmed and our only output
|
||||||
|
assert [o['status'] for o in l1.rpc.listfunds()['outputs']] == ['confirmed']
|
||||||
self.pay(l1, l2, 200000000)
|
self.pay(l1, l2, 200000000)
|
||||||
|
|
||||||
# Make sure l2 has received sig with 0 htlcs!
|
# Make sure l2 has received sig with 0 htlcs!
|
||||||
@@ -1348,8 +1351,10 @@ class LightningDTests(BaseLightningDTests):
|
|||||||
bitcoind.generate_block(5)
|
bitcoind.generate_block(5)
|
||||||
wait_forget_channels(l2)
|
wait_forget_channels(l2)
|
||||||
|
|
||||||
# Only l1 has a direct output since all of l2's outputs are respent (it failed)
|
# Only l1 has a direct output since all of l2's outputs are respent (it
|
||||||
assert closetxid in set([o['txid'] for o in l1.rpc.listfunds()['outputs']])
|
# failed). Also the output should now be listed as confirmed since we
|
||||||
|
# generated some more blocks.
|
||||||
|
assert (closetxid, "confirmed") in set([(o['txid'], o['status']) for o in l1.rpc.listfunds()['outputs']])
|
||||||
|
|
||||||
addr = l1.bitcoin.rpc.getnewaddress()
|
addr = l1.bitcoin.rpc.getnewaddress()
|
||||||
l1.rpc.withdraw(addr, "all")
|
l1.rpc.withdraw(addr, "all")
|
||||||
|
|||||||
Reference in New Issue
Block a user