mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-23 15:04:19 +01:00
common: clean up json routine locations.
We have them split over common/param.c, common/json.c, common/json_helpers.c, common/json_tok.c and common/json_stream.c. Change that to: * common/json_parse (all the json_to_xxx routines) * common/json_parse_simple (simplest the json parsing routines, for cli too) * common/json_stream (all the json_add_xxx routines) * common/json_param (all the param and param_xxx routines) Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
neil saitug
parent
f12f0d6929
commit
401f1debc5
@@ -134,14 +134,13 @@ PLUGIN_COMMON_OBJS := \
|
||||
common/daemon.o \
|
||||
common/features.o \
|
||||
common/hash_u5.o \
|
||||
common/json.o \
|
||||
common/json_helpers.o \
|
||||
common/json_param.o \
|
||||
common/json_parse.o \
|
||||
common/json_parse_simple.o \
|
||||
common/json_stream.o \
|
||||
common/json_tok.o \
|
||||
common/lease_rates.o \
|
||||
common/memleak.o \
|
||||
common/node_id.o \
|
||||
common/param.o \
|
||||
common/psbt_open.o \
|
||||
common/pseudorand.o \
|
||||
common/random_select.o \
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "config.h"
|
||||
#include <ccan/array_size/array_size.h>
|
||||
#include <common/json_tok.h>
|
||||
#include <common/json_param.h>
|
||||
#include <common/json_stream.h>
|
||||
#include <plugins/libplugin.h>
|
||||
|
||||
static u64 cycle_seconds = 0, expired_by = 86400;
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
#include <ccan/pipecmd/pipecmd.h>
|
||||
#include <ccan/tal/grab_file/grab_file.h>
|
||||
#include <ccan/tal/str/str.h>
|
||||
#include <common/json_tok.h>
|
||||
#include <common/json_param.h>
|
||||
#include <common/json_stream.h>
|
||||
#include <common/memleak.h>
|
||||
#include <errno.h>
|
||||
#include <plugins/libplugin.h>
|
||||
|
||||
@@ -8,9 +8,8 @@
|
||||
#include <ccan/tal/str/str.h>
|
||||
#include <ccan/time/time.h>
|
||||
#include <common/hsm_encryption.h>
|
||||
#include <common/json.h>
|
||||
#include <common/json_param.h>
|
||||
#include <common/json_stream.h>
|
||||
#include <common/json_tok.h>
|
||||
#include <common/scb_wiregen.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
#include <common/bolt12_merkle.h>
|
||||
#include <common/dijkstra.h>
|
||||
#include <common/gossmap.h>
|
||||
#include <common/json_param.h>
|
||||
#include <common/json_stream.h>
|
||||
#include <common/json_tok.h>
|
||||
#include <common/memleak.h>
|
||||
#include <common/overflows.h>
|
||||
#include <common/route.h>
|
||||
|
||||
@@ -13,8 +13,9 @@
|
||||
#include <ccan/array_size/array_size.h>
|
||||
#include <ccan/json_out/json_out.h>
|
||||
#include <ccan/tal/str/str.h>
|
||||
#include <common/json_param.h>
|
||||
#include <common/json_stream.h>
|
||||
#include <common/json_tok.h>
|
||||
#include <common/lease_rates.h>
|
||||
#include <common/memleak.h>
|
||||
#include <common/overflows.h>
|
||||
#include <common/psbt_open.h>
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
#include "config.h"
|
||||
#include <bitcoin/preimage.h>
|
||||
#include <ccan/array_size/array_size.h>
|
||||
#include <ccan/asort/asort.h>
|
||||
#include <ccan/cast/cast.h>
|
||||
#include <ccan/tal/str/str.h>
|
||||
#include <common/json_tok.h>
|
||||
#include <common/json_param.h>
|
||||
#include <common/json_stream.h>
|
||||
#include <common/memleak.h>
|
||||
#include <common/type_to_string.h>
|
||||
#include <plugins/libplugin-pay.h>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#define LIGHTNING_PLUGINS_LIBPLUGIN_H
|
||||
#include "config.h"
|
||||
|
||||
#include <bitcoin/tx.h>
|
||||
#include <ccan/intmap/intmap.h>
|
||||
#include <ccan/membuf/membuf.h>
|
||||
#include <ccan/strmap/strmap.h>
|
||||
@@ -11,12 +12,9 @@
|
||||
#include <common/errcode.h>
|
||||
#include <common/features.h>
|
||||
#include <common/htlc.h>
|
||||
#include <common/json.h>
|
||||
#include <common/json_command.h>
|
||||
#include <common/json_helpers.h>
|
||||
#include <common/jsonrpc_errors.h>
|
||||
#include <common/node_id.h>
|
||||
#include <common/param.h>
|
||||
#include <common/status_levels.h>
|
||||
#include <common/utils.h>
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <common/bolt11_json.h>
|
||||
#include <common/bolt12_merkle.h>
|
||||
#include <common/iso4217.h>
|
||||
#include <common/json_param.h>
|
||||
#include <common/json_stream.h>
|
||||
#include <plugins/offers.h>
|
||||
#include <plugins/offers_inv_hook.h>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef LIGHTNING_PLUGINS_OFFERS_H
|
||||
#define LIGHTNING_PLUGINS_OFFERS_H
|
||||
#include "config.h"
|
||||
#include <common/json.h>
|
||||
|
||||
struct command_result;
|
||||
struct command;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include <ccan/mem/mem.h>
|
||||
#include <ccan/tal/str/str.h>
|
||||
#include <common/bolt12_merkle.h>
|
||||
#include <common/json_stream.h>
|
||||
#include <common/type_to_string.h>
|
||||
#include <plugins/offers.h>
|
||||
#include <plugins/offers_inv_hook.h>
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
#include <ccan/tal/str/str.h>
|
||||
#include <common/bolt12.h>
|
||||
#include <common/iso4217.h>
|
||||
#include <common/json_tok.h>
|
||||
#include <common/json_param.h>
|
||||
#include <common/json_stream.h>
|
||||
#include <common/overflows.h>
|
||||
#include <plugins/offers_offer.h>
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
#include <ccan/tal/str/str.h>
|
||||
#include <common/bolt12_merkle.h>
|
||||
#include <common/gossmap.h>
|
||||
#include <common/json_param.h>
|
||||
#include <common/json_stream.h>
|
||||
#include <common/json_tok.h>
|
||||
#include <common/memleak.h>
|
||||
#include <common/pseudorand.h>
|
||||
#include <common/type_to_string.h>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "config.h"
|
||||
#include <ccan/array_size/array_size.h>
|
||||
#include <common/json_param.h>
|
||||
#include <common/json_stream.h>
|
||||
#include <common/json_tok.h>
|
||||
#include <plugins/spender/fundchannel.h>
|
||||
|
||||
static struct command_result *
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
#include <ccan/array_size/array_size.h>
|
||||
#include <ccan/tal/str/str.h>
|
||||
#include <common/addr.h>
|
||||
#include <common/json_param.h>
|
||||
#include <common/json_stream.h>
|
||||
#include <common/json_tok.h>
|
||||
#include <common/psbt_open.h>
|
||||
#include <common/pseudorand.h>
|
||||
#include <common/type_to_string.h>
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
#include <ccan/array_size/array_size.h>
|
||||
#include <ccan/json_out/json_out.h>
|
||||
#include <ccan/tal/str/str.h>
|
||||
#include <common/json_param.h>
|
||||
#include <common/json_stream.h>
|
||||
#include <common/json_tok.h>
|
||||
#include <common/psbt_open.h>
|
||||
#include <common/pseudorand.h>
|
||||
#include <common/type_to_string.h>
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
#include <ccan/tal/str/str.h>
|
||||
#include <common/dijkstra.h>
|
||||
#include <common/gossmap.h>
|
||||
#include <common/json_param.h>
|
||||
#include <common/json_stream.h>
|
||||
#include <common/json_tok.h>
|
||||
#include <common/memleak.h>
|
||||
#include <common/pseudorand.h>
|
||||
#include <common/route.h>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
#include <bitcoin/psbt.h>
|
||||
#include <ccan/array_size/array_size.h>
|
||||
#include <common/addr.h>
|
||||
#include <common/json_param.h>
|
||||
#include <common/json_stream.h>
|
||||
#include <common/json_tok.h>
|
||||
#include <common/memleak.h>
|
||||
#include <common/psbt_open.h>
|
||||
#include <common/pseudorand.h>
|
||||
|
||||
Reference in New Issue
Block a user