wire: move short_channel formatting functions into bitcoin/short_channel_id

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2019-02-20 22:01:48 +10:30
parent ebca6e1ea3
commit 269dbe585c
2 changed files with 5 additions and 2 deletions

View File

@ -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);

View File

@ -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: