Skip to content

Commit

Permalink
pay: Make json_add_payment_fields accessible to other parts.
Browse files Browse the repository at this point in the history
  • Loading branch information
ZmnSCPxj authored and rustyrussell committed Mar 19, 2018
1 parent 7443bf5 commit 3c39bcc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lightningd/pay.c
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ Utility
-----------------------------------------------------------------------------*/

/* Outputs fields, not a separate object*/
static void
void
json_add_payment_fields(struct json_result *response,
const struct wallet_payment *t)
{
Expand Down
7 changes: 7 additions & 0 deletions lightningd/pay.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <wire/gen_onion_wire.h>

struct htlc_out;
struct json_result;
struct lightningd;
struct route_hop;
struct sha256;
Expand Down Expand Up @@ -86,4 +87,10 @@ void payment_failed(struct lightningd *ld, const struct htlc_out *hout,
/* Inform payment system to save the payment. */
void payment_store(struct lightningd *ld, const struct sha256 *payment_hash);

/* Output the fields of a payment. Caller should have put the
* response within a JSON object and is responsible for
* closing the object. */
void json_add_payment_fields(struct json_result *response,
const struct wallet_payment *t);

#endif /* LIGHTNING_LIGHTNINGD_PAY_H */

0 comments on commit 3c39bcc

Please sign in to comment.