mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 23:24:27 +01:00
routing: Added IRC announcement glue
Added channel announcement serialization and parsing, as well as the entrypoints for the IRC peer discovery. Announcements are signed by the sending endpoint and signatures are verified before adding the channels to the local view of the topology. We do not yet verify the existence of the anchor transaction.
This commit is contained in:
8
utils.c
8
utils.c
@@ -7,3 +7,11 @@ char *tal_hexstr(const tal_t *ctx, const void *data, size_t len)
|
||||
hex_encode(data, len, str, hex_str_size(len));
|
||||
return str;
|
||||
}
|
||||
|
||||
u8 *tal_hexdata(const tal_t *ctx, const void *str, size_t len)
|
||||
{
|
||||
u8 *data = tal_arr(ctx, u8, hex_data_size(len));
|
||||
if (!hex_decode(str, len, data, hex_data_size(len)))
|
||||
return NULL;
|
||||
return data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user