mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
Plugins: Add a test for the 'invoice_payment' notfication
This commit is contained in:
committed by
ZmnSCPxj, ZmnSCPxj jxPCSmnZ
parent
b5bb7f191f
commit
34533ead68
@@ -34,6 +34,14 @@ def on_disconnect(plugin, id):
|
||||
plugin.log("Received disconnect event for peer {}".format(id))
|
||||
|
||||
|
||||
@plugin.subscribe("invoice_payment")
|
||||
def on_payment(plugin, invoice_payment):
|
||||
plugin.log("Received invoice_payment event for label {}, preimage {},"
|
||||
" and amount of {}".format(invoice_payment.get("label"),
|
||||
invoice_payment.get("preimage"),
|
||||
invoice_payment.get("msat")))
|
||||
|
||||
|
||||
@plugin.hook("htlc_accepted")
|
||||
def on_htlc_accepted(onion, htlc, plugin):
|
||||
plugin.log('on_htlc_accepted called')
|
||||
|
||||
Reference in New Issue
Block a user