-
Notifications
You must be signed in to change notification settings - Fork 912
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
Add a status field to listpeers
indicating where an HTLC is currently being held
#4580
Conversation
f944222
to
a8d33c6
Compare
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.
Seems some uninitialized fields, should be easy to fix?
|
||
/* A simple text annotation shown in `listpeers` */ | ||
char *status; |
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.
This seems to be in the wrong commit?
hin->status = | ||
tal_fmt(hin, "Waiting for the htlc_accepted hook of plugin %s", | ||
plugin->shortname); | ||
|
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.
You presumably should initialize this to NULL everywhere hin is allocated?
Got my commits mixed up it seems, I'll reslice them and update here. |
We will start annotating some of the in-memory objects with a message indicating which plugin currently is processing the hook.
ff23a72
to
5dc4b55
Compare
Missing regeneration of files, fixed (and trivial rebase on master). Ack 5dc4b55 |
Oops, and you freed it without setting to NULL, causing a use-after-free.
|
Annotating the htlc in `listpeers` with their current status, and which plugin is currently holding on to them with their `htlc_accepted` hook can help us debug where plugins may go wrong. Changelog-Added: jsonrpc: HTLCs in `listpeers` are now annotated with a status if they are waiting on an `htlc_accepted` hook of a plugin.
5dc4b55
to
b89ce78
Compare
Ack b89ce78 |
Debugging where an HTLC is currently being held can help us identify
plugins that are not behaving correctly. On top of the pure
status
field in the
htlcs
array we also print debug messages when enteringand leaving a plugin hook, so logs are a bit more helpful too.