Browse Source

Remove unused functions not covered by unit tests

ppa-0.6.1
practicalswift 7 years ago
committed by Christian Decker
parent
commit
e25297dd0a
  1. 5
      channeld/channeld_htlc.h
  2. 8
      common/htlc.h
  3. 5
      common/json_escaped.c
  4. 4
      common/json_escaped.h
  5. 5
      lightningd/channel.h

5
channeld/channeld_htlc.h

@ -70,11 +70,6 @@ static inline struct htlc *htlc_get(struct htlc_map *htlcs, u64 id, enum side ow
return NULL;
}
static inline size_t htlc_map_count(const struct htlc_map *htlcs)
{
return htlcs->raw.elems;
}
/* FIXME: Move these out of the hash! */
static inline bool htlc_is_dead(const struct htlc *htlc)
{

8
common/htlc.h

@ -73,12 +73,4 @@ static inline const char *side_to_str(enum side side)
}
abort();
}
static inline enum side str_to_side(const char *str)
{
if (streq(str, "LOCAL"))
return LOCAL;
assert(streq(str, "REMOTE"));
return REMOTE;
}
#endif /* LIGHTNING_COMMON_HTLC_H */

5
common/json_escaped.c

@ -24,11 +24,6 @@ struct json_escaped *json_tok_escaped_string(const tal_t *ctx,
tok->end - tok->start);
}
bool json_escaped_streq(const struct json_escaped *esc, const char *str)
{
return streq(esc->s, str);
}
bool json_escaped_eq(const struct json_escaped *a,
const struct json_escaped *b)
{

4
common/json_escaped.h

@ -21,10 +21,6 @@ struct json_escaped *json_tok_escaped_string(const tal_t *ctx,
const char *buffer,
const jsmntok_t *tok);
/* Is @esc equal to @str */
bool json_escaped_streq(const struct json_escaped *esc, const char *str);
/* Are two escaped json strings identical? */
bool json_escaped_eq(const struct json_escaped *a,
const struct json_escaped *b);

5
lightningd/channel.h

@ -187,11 +187,6 @@ static inline bool channel_active(const struct channel *channel)
&& !channel_on_chain(channel);
}
static inline bool channel_wants_reconnect(const struct channel *channel)
{
return channel->state <= CLOSINGD_COMPLETE;
}
void derive_channel_seed(struct lightningd *ld, struct privkey *seed,
const struct pubkey *peer_id,
const u64 dbid);

Loading…
Cancel
Save