type_to_string: move formatting to appropriate files.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2017-01-04 14:07:15 +10:30
parent 5bd8063ddb
commit c7b69abdaa
12 changed files with 120 additions and 82 deletions

View File

@@ -1,5 +1,6 @@
#include "privkey.h"
#include "pubkey.h"
#include "type_to_string.h"
#include "utils.h"
#include <assert.h>
#include <ccan/mem/mem.h>
@@ -66,6 +67,8 @@ bool pubkey_eq(const struct pubkey *a, const struct pubkey *b)
return structeq(&a->pubkey, &b->pubkey);
}
REGISTER_TYPE_TO_STRING(pubkey, pubkey_to_hexstr);
int pubkey_cmp(const struct pubkey *a, const struct pubkey *b)
{
u8 keya[33], keyb[33];