common/json: move rest of bitcoin/lightning-specific json functions to json_helpers.

This dramatically reduces the linking requirements of lightning-cli.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2020-05-15 20:00:25 +09:30
committed by Christian Decker
parent fda5f0b427
commit f77d70d546
21 changed files with 340 additions and 346 deletions

View File

@@ -1,6 +1,7 @@
#include "../towire.c"
#include "../fromwire.c"
#include "../peer_wire.c"
#include "common/channel_id.c"
#include <assert.h>
#include <stdio.h>
@@ -34,13 +35,6 @@ bool amount_sat_eq(struct amount_sat a UNNEEDED, struct amount_sat b UNNEEDED)
struct amount_sat a UNNEEDED,
struct amount_sat b UNNEEDED)
{ fprintf(stderr, "amount_sat_sub called!\n"); abort(); }
/* Generated stub for fromwire_channel_id */
void fromwire_channel_id(const u8 **cursor UNNEEDED, size_t *max UNNEEDED,
struct channel_id *channel_id UNNEEDED)
{ fprintf(stderr, "fromwire_channel_id called!\n"); abort(); }
/* Generated stub for towire_channel_id */
void towire_channel_id(u8 **pptr UNNEEDED, const struct channel_id *channel_id UNNEEDED)
{ fprintf(stderr, "towire_channel_id called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */
/* memsetting pubkeys doesn't work */