Browse Source

cleanup: Use `u32` as the type of `max_hops` in `gossipd`

travis-debug
trueptolemy 5 years ago
committed by Christian Decker
parent
commit
d8dce6e61f
  1. 6
      gossipd/routing.c
  2. 2
      gossipd/routing.h
  3. 2
      gossipd/test/run-crc32_of_update.c
  4. 2
      gossipd/test/run-extended-info.c
  5. 2
      lightningd/gossip_control.c

6
gossipd/routing.c

@ -1122,7 +1122,7 @@ find_shorter_route(const tal_t *ctx, struct routing_state *rstate,
struct node *src, struct node *dst, struct node *src, struct node *dst,
const struct node *me, const struct node *me,
struct amount_msat msat, struct amount_msat msat,
size_t max_hops, u32 max_hops,
double fuzz, const struct siphash_seed *base_seed, double fuzz, const struct siphash_seed *base_seed,
struct chan **long_route, struct chan **long_route,
struct amount_msat *fee) struct amount_msat *fee)
@ -1245,7 +1245,7 @@ find_route(const tal_t *ctx, struct routing_state *rstate,
struct amount_msat msat, struct amount_msat msat,
double riskfactor, double riskfactor,
double fuzz, const struct siphash_seed *base_seed, double fuzz, const struct siphash_seed *base_seed,
size_t max_hops, u32 max_hops,
struct amount_msat *fee) struct amount_msat *fee)
{ {
struct node *src, *dst; struct node *src, *dst;
@ -2494,7 +2494,7 @@ struct route_hop *get_route(const tal_t *ctx, struct routing_state *rstate,
u32 final_cltv, u32 final_cltv,
double fuzz, u64 seed, double fuzz, u64 seed,
struct exclude_entry **excluded, struct exclude_entry **excluded,
size_t max_hops) u32 max_hops)
{ {
struct chan **route; struct chan **route;
struct amount_msat total_amount; struct amount_msat total_amount;

2
gossipd/routing.h

@ -385,7 +385,7 @@ struct route_hop *get_route(const tal_t *ctx, struct routing_state *rstate,
double fuzz, double fuzz,
u64 seed, u64 seed,
struct exclude_entry **excluded, struct exclude_entry **excluded,
size_t max_hops); u32 max_hops);
/* Disable channel(s) based on the given routing failure. */ /* Disable channel(s) based on the given routing failure. */
void routing_failure(struct routing_state *rstate, void routing_failure(struct routing_state *rstate,
const struct node_id *erring_node, const struct node_id *erring_node,

2
gossipd/test/run-crc32_of_update.c

@ -146,7 +146,7 @@ struct route_hop *get_route(const tal_t *ctx UNNEEDED, struct routing_state *rst
double fuzz UNNEEDED, double fuzz UNNEEDED,
u64 seed UNNEEDED, u64 seed UNNEEDED,
struct exclude_entry **excluded UNNEEDED, struct exclude_entry **excluded UNNEEDED,
size_t max_hops UNNEEDED) u32 max_hops UNNEEDED)
{ fprintf(stderr, "get_route called!\n"); abort(); } { fprintf(stderr, "get_route called!\n"); abort(); }
/* Generated stub for gossip_peerd_wire_type_name */ /* Generated stub for gossip_peerd_wire_type_name */
const char *gossip_peerd_wire_type_name(int e UNNEEDED) const char *gossip_peerd_wire_type_name(int e UNNEEDED)

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

@ -153,7 +153,7 @@ struct route_hop *get_route(const tal_t *ctx UNNEEDED, struct routing_state *rst
double fuzz UNNEEDED, double fuzz UNNEEDED,
u64 seed UNNEEDED, u64 seed UNNEEDED,
struct exclude_entry **excluded UNNEEDED, struct exclude_entry **excluded UNNEEDED,
size_t max_hops UNNEEDED) u32 max_hops UNNEEDED)
{ fprintf(stderr, "get_route called!\n"); abort(); } { fprintf(stderr, "get_route called!\n"); abort(); }
/* Generated stub for gossip_peerd_wire_type_name */ /* Generated stub for gossip_peerd_wire_type_name */
const char *gossip_peerd_wire_type_name(int e UNNEEDED) const char *gossip_peerd_wire_type_name(int e UNNEEDED)

2
lightningd/gossip_control.c

@ -312,7 +312,7 @@ static struct command_result *json_getroute(struct command *cmd,
struct node_id *source; struct node_id *source;
const jsmntok_t *excludetok; const jsmntok_t *excludetok;
struct amount_msat *msat; struct amount_msat *msat;
unsigned *cltv; u32 *cltv;
double *riskfactor; double *riskfactor;
const struct exclude_entry **excluded; const struct exclude_entry **excluded;
u32 *max_hops; u32 *max_hops;

Loading…
Cancel
Save