(node_factory)
| 1747 | |
| 1748 | |
| 1749 | def test_sendpay_notifications_nowaiter(node_factory): |
| 1750 | opts = [{'plugin': os.path.join(os.getcwd(), 'tests/plugins/sendpay_notifications.py')}, |
| 1751 | {}, |
| 1752 | {'may_reconnect': False}] |
| 1753 | l1, l2, l3 = node_factory.line_graph(3, opts=opts, wait_for_announce=True) |
| 1754 | chanid23 = l2.get_channel_scid(l3) |
| 1755 | amount = 10**8 |
| 1756 | |
| 1757 | inv1 = l3.rpc.invoice(amount, "first", "desc") |
| 1758 | payment_hash1 = inv1['payment_hash'] |
| 1759 | inv2 = l3.rpc.invoice(amount, "second", "desc") |
| 1760 | payment_hash2 = inv2['payment_hash'] |
| 1761 | route = l1.single_route(l3.info['id'], amount) |
| 1762 | |
| 1763 | l1.rpc.sendpay(route, payment_hash1, payment_secret=inv1['payment_secret']) |
| 1764 | l1.daemon.wait_for_log(r'Received a sendpay_success') |
| 1765 | |
| 1766 | l2.rpc.close(chanid23, 1) |
| 1767 | |
| 1768 | l1.rpc.sendpay(route, payment_hash2, payment_secret=inv2['payment_secret']) |
| 1769 | l1.daemon.wait_for_log(r'Received a sendpay_failure') |
| 1770 | |
| 1771 | results = l1.rpc.call('listsendpays_plugin') |
| 1772 | assert len(results['sendpay_success']) == 1 |
| 1773 | assert len(results['sendpay_failure']) == 1 |
| 1774 | |
| 1775 | |
| 1776 | def test_inline_plugin_wait_for_log_no_selfmatch(node_factory): |
nothing calls this directly
no test coverage detected