I'm running lightningd with many plugins. One of them, webbook, is getting all notifications correctly.
At the same time I'm developing/testing a new one that should be getting the sendpay_success notification, but isn't. Or maybe I'm crazy.
I know for sure it was getting these notifications all the time when I was fixing bugs somewhere else while testing it on my real node. However, when it was time for me to fix bugs happening at the sendpay_success handler I inserted a bunch of log statements there and couldn't see any logs! The method wasn't being called anymore.
This is out of the scope of this reposutory, but for this new plugin I'm using the same plugin framework webhook uses but I even tried to insert log statements at lower-level handlers like here and couldn't get any sendpay_success logs happening there.
Also, connect notifications seem to be coming in well. Also the same code is being used to handle htlc_accept hook calls and these are always called and handled by the plugin.
Issue and Steps to Reproduce
I'm running
lightningd
with many plugins. One of them,webbook
, is getting all notifications correctly.At the same time I'm developing/testing a new one that should be getting the
sendpay_success
notification, but isn't. Or maybe I'm crazy.I know for sure it was getting these notifications all the time when I was fixing bugs somewhere else while testing it on my real node. However, when it was time for me to fix bugs happening at the
sendpay_success
handler I inserted a bunch of log statements there and couldn't see any logs! The method wasn't being called anymore.This is out of the scope of this reposutory, but for this new plugin I'm using the same plugin framework
webhook
uses but I even tried to insert log statements at lower-level handlers like here and couldn't get any sendpay_success logs happening there.Also,
connect
notifications seem to be coming in well. Also the same code is being used to handlehtlc_accept
hook calls and these are always called and handled by the plugin.For these reasons I started to think there could be an error at the plugin notification dispatching code from
lightningd
. So I've inserted alog_info
statement at https://github.com/ElementsProject/lightning/blob/61383408a45960bf7fd045fc420c95478de699c0/lightningd/plugin.c#L1116 and expected for the worse.For my surprise, when I recompiled and run again I got the log printed correctly and the notification handler was called at my plugin.
I then removed the log line, recompiled and tried again: again
sendpay_success
wasn't called at my plugin.Please disconsider if this is too dumb.
getinfo
output