mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 21:35:11 +01:00
pytest: add a resart to test_permfail that we don't forget on restart.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
a3178b8177
commit
d280eabc1e
@ -1112,6 +1112,7 @@ def test_permfail_htlc_out(node_factory, bitcoind, executor):
|
||||
wait_for(lambda: l2.rpc.listpeers()['peers'] == [])
|
||||
|
||||
|
||||
@pytest.mark.xfail(strict=True)
|
||||
@unittest.skipIf(not DEVELOPER, "needs DEVELOPER=1")
|
||||
def test_permfail(node_factory, bitcoind):
|
||||
l1, l2 = node_factory.line_graph(2)
|
||||
@ -1161,6 +1162,14 @@ def test_permfail(node_factory, bitcoind):
|
||||
# Now, mine 4 blocks so it sends out the spending tx.
|
||||
bitcoind.generate_block(4)
|
||||
|
||||
# onchaind notes to-local payment immediately.
|
||||
assert (closetxid, "confirmed") in set([(o['txid'], o['status']) for o in l1.rpc.listfunds()['outputs']])
|
||||
|
||||
# Restart, should still be confirmed (fails: unwinding blocks erases
|
||||
# the confirmation, and we don't re-make it).
|
||||
l1.restart()
|
||||
wait_for(lambda: (closetxid, "confirmed") in set([(o['txid'], o['status']) for o in l1.rpc.listfunds()['outputs']]))
|
||||
|
||||
# It should send the to-wallet tx.
|
||||
l2.daemon.wait_for_log('Broadcasting OUR_DELAYED_RETURN_TO_WALLET')
|
||||
l2.daemon.wait_for_log('sendrawtx exit 0')
|
||||
|
Loading…
Reference in New Issue
Block a user