-
Notifications
You must be signed in to change notification settings - Fork 895
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
Changes from all commits
e626491
42698fe
74d7769
b89ce78
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1011,11 +1011,18 @@ static bool htlc_accepted_hook_deserialize(struct htlc_accepted_hook_payload *re | |
} | ||
|
||
static void htlc_accepted_hook_serialize(struct htlc_accepted_hook_payload *p, | ||
struct json_stream *s) | ||
struct json_stream *s, | ||
struct plugin *plugin) | ||
{ | ||
const struct route_step *rs = p->route_step; | ||
const struct htlc_in *hin = p->hin; | ||
struct htlc_in *hin = p->hin; | ||
s32 expiry = hin->cltv_expiry, blockheight = p->ld->topology->tip->height; | ||
|
||
tal_free(hin->status); | ||
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 commentThe reason will be displayed to describe this comment to others. Learn more. You presumably should initialize this to NULL everywhere hin is allocated? |
||
json_object_start(s, "onion"); | ||
|
||
json_add_hex_talarr(s, "payload", rs->raw_payload); | ||
|
@@ -1067,6 +1074,8 @@ htlc_accepted_hook_final(struct htlc_accepted_hook_payload *request STEALS) | |
struct htlc_in *hin = request->hin; | ||
struct channel *channel = request->channel; | ||
|
||
request->hin->status = tal_free(request->hin->status); | ||
|
||
/* *Now* we barf if it failed to decode */ | ||
if (!request->payload) { | ||
log_debug(channel->log, | ||
|
@@ -2034,7 +2043,8 @@ struct commitment_revocation_payload { | |
}; | ||
|
||
static void commitment_revocation_hook_serialize( | ||
struct commitment_revocation_payload *payload, struct json_stream *stream) | ||
struct commitment_revocation_payload *payload, struct json_stream *stream, | ||
struct plugin *plugin) | ||
{ | ||
json_add_txid(stream, "commitment_txid", &payload->commitment_txid); | ||
json_add_tx(stream, "penalty_tx", payload->penalty_tx); | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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?