mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
pytest: Reproduce issue #3403, sendpay notifications with no waiter
We clone the test above, but this time we don't attach waiters (they'd be racy anyway), and we wait for the notification to be called. This fails, but is fixed in the next two commits.
This commit is contained in:
@@ -14,13 +14,13 @@ def init(configuration, options, plugin):
|
||||
|
||||
@plugin.subscribe("sendpay_success")
|
||||
def notify_sendpay_success(plugin, sendpay_success):
|
||||
plugin.log("receive a sendpay_success recored, id: {}, payment_hash: {}".format(sendpay_success['id'], sendpay_success['payment_hash']))
|
||||
plugin.log("Received a sendpay_success: id={}, payment_hash={}".format(sendpay_success['id'], sendpay_success['payment_hash']))
|
||||
plugin.success_list.append(sendpay_success)
|
||||
|
||||
|
||||
@plugin.subscribe("sendpay_failure")
|
||||
def notify_sendpay_failure(plugin, sendpay_failure):
|
||||
plugin.log("receive a sendpay_failure recored, id: {}, payment_hash: {}".format(sendpay_failure['data']['id'],
|
||||
plugin.log("Received a sendpay_failure: id={}, payment_hash={}".format(sendpay_failure['data']['id'],
|
||||
sendpay_failure['data']['payment_hash']))
|
||||
plugin.failure_list.append(sendpay_failure)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user