-
Notifications
You must be signed in to change notification settings - Fork 906
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
plugin:added invoice creation event #3658
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome @rbndg, good job on your first contribution 👍
I went through and added a couple of comments, but I think most would also apply to the invoice_payment
notification from which you took inspiration. I can go through and clean those up at a later time, especially the case of the serializer function seems weird and could do with a bit of type-checking.
I think the only really required change would be to amend the doc, otherwise LGTM ^^
@cdecker made some changes you recommended. |
I allowed myself to rebase on top of |
Ok, let me walk you through how you can debug these kinds of issues. Looking at the CI tests you can see the following segfault in the logs:
Notice the last stack frame before we jump into the df014c6#diff-2c1d183f1046f5050b71988e22959046R723 This accesses some VALGRIND=1 pytest -vvv tests -k test_invoice This just runs one of the failing tests (
See that last line talking about address info->cmd->ld, *info->b11->msat, info->payment_preimage, info->label
^ ^ ^ ^ ^ ^ ^ I marked the dereferencing operations in that snippet. We could step through assert(info->b11->msat != NULL); Running again, this indeed fails:
So we now know that this is at least one of the issues we're facing. Now we I added a fixup commit that we're going to squash into the series after review |
Thanks for the detailed answer @cdecker really helpful. I followed the logs for the last remaining build fail. The problem seems to be that when the channel is closed and 100 blocks are generated, it doesn't consider that the channel is irrevocably closed, hence the peer is not forgotten?
|
Very good analysis @rbndg, that seems to indeed be the issue here. Sadly we do have a couple of flaky tests that fail in completely unrelated tests and muddy the waters. So I think this particular failure is unrelated with your changes. I restarted the failing run and it should terminate correctly. I keep a list of failed tests and their logs, and every once in a while I spend a day unflaking them 🤓 |
Great! I hope to improve and make more useful contributions eventually! |
New invoice_creation event triggered when an new invoice is created Changelog-Added: plugin: New invoice_creation plugin event
Rebased on top of |
ACK e4f0721 |
Hello everyone
This PR adds a new invoice_creation event which is triggered when a new invoice is created.
(This is my first PR to C-Lightning 🤓)
Changelog-Added: plugin: new invoice_creation event