Skip to content

Commit

Permalink
lightningd: fix up compile errors from bad merge.
Browse files Browse the repository at this point in the history
The new listforwards was old-style, and the new API was merged.

Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed Oct 20, 2018
1 parent 0dcd668 commit 7eec225
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lightningd/peer_htlcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1843,7 +1843,7 @@ static const struct json_command dev_ignore_htlcs = {
AUTODATA(json_command, &dev_ignore_htlcs);
#endif /* DEVELOPER */

static void listforwardings_add_forwardings(struct json_result *response, struct wallet *wallet)
static void listforwardings_add_forwardings(struct json_stream *response, struct wallet *wallet)
{
const struct forwarding *forwardings;
forwardings = wallet_forwarded_payments_get(wallet, tmpctx);
Expand All @@ -1869,11 +1869,12 @@ static void listforwardings_add_forwardings(struct json_result *response, struct
static void json_listforwards(struct command *cmd, const char *buffer,
const jsmntok_t *params)
{
struct json_result *response = new_json_result(cmd);
struct json_stream *response;

if (!param(cmd, buffer, params, NULL))
return;

response = json_stream_success(cmd);
json_object_start(response, NULL);
listforwardings_add_forwardings(response, cmd->ld->wallet);
json_object_end(response);
Expand Down
3 changes: 3 additions & 0 deletions lightningd/test/run-jsonrpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ bool param(struct command *cmd UNNEEDED, const char *buffer UNNEEDED,
/* Generated stub for version */
const char *version(void)
{ fprintf(stderr, "version called!\n"); abort(); }
/* Generated stub for wallet_total_forward_fees */
u64 wallet_total_forward_fees(struct wallet *w UNNEEDED)
{ fprintf(stderr, "wallet_total_forward_fees called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */

bool deprecated_apis;
Expand Down

0 comments on commit 7eec225

Please sign in to comment.