Browse Source

common/wireaddr: don't include lightningd/lightningd.

common should not include specific per-daemon files.  Turns out this
caused a lot of indirect includes to be exposed.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
travis-debug
Rusty Russell 5 years ago
parent
commit
684ed4231f
  1. 4
      common/json.c
  2. 1
      common/wireaddr.h
  3. 1
      devtools/print_wire.h
  4. 2
      gossipd/gossip_generation.c
  5. 1
      gossipd/test/run-bench-find_route.c
  6. 1
      gossipd/test/run-crc32_of_update.c
  7. 1
      gossipd/test/run-extended-info.c
  8. 1
      gossipd/test/run-find_route-specific.c
  9. 1
      gossipd/test/run-find_route.c
  10. 1
      gossipd/test/run-next_block_range.c
  11. 1
      gossipd/test/run-overlong.c
  12. 1
      gossipd/test/run-txout_failure.c
  13. 3
      lightningd/signmessage.c

4
common/json.c

@ -4,7 +4,10 @@
#include <bitcoin/preimage.h>
#include <bitcoin/privkey.h>
#include <bitcoin/pubkey.h>
#include <bitcoin/short_channel_id.h>
#include <bitcoin/tx.h>
#include <ccan/build_assert/build_assert.h>
#include <ccan/json_escape/json_escape.h>
#include <ccan/mem/mem.h>
#include <ccan/str/hex/hex.h>
#include <ccan/tal/str/str.h>
@ -14,6 +17,7 @@
#include <common/json_stream.h>
#include <common/node_id.h>
#include <common/overflows.h>
#include <common/type_to_string.h>
#include <common/utils.h>
#include <common/wireaddr.h>
#include <ctype.h>

1
common/wireaddr.h

@ -3,7 +3,6 @@
#include "config.h"
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
#include <lightningd/lightningd.h>
#include <stdbool.h>
#include <stdlib.h>
#include <sys/socket.h>

1
devtools/print_wire.h

@ -4,6 +4,7 @@
#include <bitcoin/tx.h>
#include <common/wireaddr.h>
#include <wire/gen_peer_wire.h>
#include <wire/gen_onion_wire.h>
struct tlv_print_record_type {
u64 type;

2
gossipd/gossip_generation.c

@ -2,7 +2,9 @@
* generation, man!" */
#include <ccan/mem/mem.h>
#include <common/memleak.h>
#include <common/status.h>
#include <common/timeout.h>
#include <common/type_to_string.h>
#include <common/utils.h>
#include <common/wireaddr.h>
#include <errno.h>

1
gossipd/test/run-bench-find_route.c

@ -4,6 +4,7 @@
#include <ccan/opt/opt.h>
#include <ccan/tal/str/str.h>
#include <ccan/time/time.h>
#include <common/json_stream.h>
#include <common/pseudorand.h>
#include <common/status.h>
#include <common/type_to_string.h>

1
gossipd/test/run-crc32_of_update.c

@ -3,6 +3,7 @@ int unused_main(int argc, char *argv[]);
#include "../queries.c"
#include "../gossip_generation.c"
#undef main
#include <common/json_stream.h>
#include <stdio.h>
/* AUTOGENERATED MOCKS START */

1
gossipd/test/run-extended-info.c

@ -6,6 +6,7 @@
#include <ccan/str/hex/hex.h>
#include <common/json.h>
#include <common/json_helpers.h>
#include <common/json_stream.h>
#include <stdio.h>
#ifdef NDEBUG

1
gossipd/test/run-find_route-specific.c

@ -5,6 +5,7 @@
* getchannels:
* {'channels': [{'active': True, 'short_id': '6990x2x1/1', 'fee_per_kw': 10, 'delay': 5, 'message_flags': 0, 'channel_flags': 1, 'destination': '0230ad0e74ea03976b28fda587bb75bdd357a1938af4424156a18265167f5e40ae', 'source': '02ea622d5c8d6143f15ed3ce1d501dd0d3d09d3b1c83a44d0034949f8a9ab60f06', 'last_update': 1504064344}, {'active': True, 'short_id': '6989x2x1/0', 'fee_per_kw': 10, 'delay': 5, 'message_flags': 0, 'channel_flags': 0, 'destination': '03c173897878996287a8100469f954dd820fcd8941daed91c327f168f3329be0bf', 'source': '0230ad0e74ea03976b28fda587bb75bdd357a1938af4424156a18265167f5e40ae', 'last_update': 1504064344}, {'active': True, 'short_id': '6990x2x1/0', 'fee_per_kw': 10, 'delay': 5, 'message_flags': 0, 'channel_flags': 0, 'destination': '02ea622d5c8d6143f15ed3ce1d501dd0d3d09d3b1c83a44d0034949f8a9ab60f06', 'source': '0230ad0e74ea03976b28fda587bb75bdd357a1938af4424156a18265167f5e40ae', 'last_update': 1504064344}, {'active': True, 'short_id': '6989x2x1/1', 'fee_per_kw': 10, 'delay': 5, 'message_flags': 0, 'channel_flags': 1, 'destination': '0230ad0e74ea03976b28fda587bb75bdd357a1938af4424156a18265167f5e40ae', 'source': '03c173897878996287a8100469f954dd820fcd8941daed91c327f168f3329be0bf', 'last_update': 1504064344}]}
*/
#include <common/json_stream.h>
#include <common/status.h>
#include <stdio.h>

1
gossipd/test/run-find_route.c

@ -1,5 +1,6 @@
#include "../routing.c"
#include "../gossip_store.c"
#include <common/json_stream.h>
#include <stdio.h>
void status_fmt(enum log_level level UNUSED,

1
gossipd/test/run-next_block_range.c

@ -1,5 +1,6 @@
#include "../seeker.c"
#include <ccan/err/err.h>
#include <common/json_stream.h>
#include <common/wireaddr.h>
#include <stdarg.h>
#include <stdio.h>

1
gossipd/test/run-overlong.c

@ -1,5 +1,6 @@
#include "../routing.c"
#include "../gossip_store.c"
#include <common/json_stream.h>
#include <stdio.h>
void status_fmt(enum log_level level UNUSED,

1
gossipd/test/run-txout_failure.c

@ -1,5 +1,6 @@
#include "../routing.c"
#include "../common/timeout.c"
#include <common/json_stream.h>
#include <stdio.h>
/* AUTOGENERATED MOCKS START */

3
lightningd/signmessage.c

@ -1,5 +1,6 @@
#include <common/bech32.h>
#include <common/hash_u5.h>
#include <common/json_command.h>
#include <common/json_helpers.h>
#include <common/jsonrpc_errors.h>
#include <common/param.h>
@ -8,6 +9,8 @@
#include <errno.h>
#include <gossipd/gen_gossip_wire.h>
#include <hsmd/gen_hsm_wire.h>
#include <lightningd/jsonrpc.h>
#include <lightningd/lightningd.h>
#include <lightningd/subd.h>
#include <string.h>
#include <wire/wire_sync.h>

Loading…
Cancel
Save