Browse Source

lightningd: fix up compile errors from bad merge.

The new listforwards was old-style, and the new API was merged.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.2rc1
Rusty Russell 6 years ago
parent
commit
7eec2253e9
  1. 5
      lightningd/peer_htlcs.c
  2. 3
      lightningd/test/run-jsonrpc.c

5
lightningd/peer_htlcs.c

@ -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);
@ -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);

3
lightningd/test/run-jsonrpc.c

@ -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;

Loading…
Cancel
Save