You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pytest: test xpay gracefully handles failure after success.
We can create this scenario by having one path force close. We take
the opportunity to log this, even in non-slow-mode, since it's interesting
(not our bug, but someone just lost money!).
Signed-off-by: Rusty Russell <[email protected]>
l2.daemon.wait_for_log('Peer permanent failure in CHANNELD_NORMAL: Offered HTLC 0 SENT_ADD_ACK_REVOCATION cltv 124 hit deadline')
752
+
bitcoind.generate_block(3, wait_for_mempool=1)
753
+
754
+
l1.daemon.wait_for_log(r"UNUSUAL.*Destination accepted partial payment, failed a part \(Error permanent_channel_failure for path ->022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59->0382ce59ebf18be7d84677c2e35f23294b9992ceca95491fcf8a56c6cb2d9de199->032cf15d1ad9c4a08d26eab1918f732d8ef8fdc6abb9640bf3db174372c491304e, from 022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59\)")
755
+
# Could be either way around, check both
756
+
line=l1.daemon.is_in_log(r"UNUSUAL.*Destination accepted partial payment, failed a part")
757
+
assertre.search(r'but accepted only 32000msat of 500000000msat\. Winning\?!', line) orre.search(r'but accepted only 499968000msat of 500000000msat\. Winning\?!', line)
758
+
759
+
ifslow_modeisTrue:
760
+
# Now it succeeds, but notes that it only sent one part!
0 commit comments