Browse Source

wire: move short_channel formatting functions into bitcoin/short_channel_id

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
confirmed-only
Rusty Russell 6 years ago
parent
commit
269dbe585c
  1. 5
      bitcoin/short_channel_id.c
  2. 2
      wire/fromwire.c

5
bitcoin/short_channel_id.c

@ -1,5 +1,6 @@
#include <bitcoin/short_channel_id.h>
#include <ccan/tal/str/str.h>
#include <common/type_to_string.h>
#include <stdio.h>
#include <string.h>
@ -95,3 +96,7 @@ char *short_channel_id_dir_to_str(const tal_t *ctx,
tal_free(scidstr);
return str;
}
REGISTER_TYPE_TO_STRING(short_channel_id, short_channel_id_to_str);
REGISTER_TYPE_TO_STRING(short_channel_id_dir, short_channel_id_dir_to_str);

2
wire/fromwire.c

@ -241,8 +241,6 @@ char *fromwire_wirestring(const tal_t *ctx, const u8 **cursor, size_t *max)
return NULL;
}
REGISTER_TYPE_TO_STRING(short_channel_id, short_channel_id_to_str);
REGISTER_TYPE_TO_STRING(short_channel_id_dir, short_channel_id_dir_to_str);
REGISTER_TYPE_TO_HEXSTR(channel_id);
/* BOLT #2:

Loading…
Cancel
Save