mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-20 21:44:29 +01:00
Use node_id everywhere for nodes.
I tried to just do gossipd, but it was uncontainable, so this ended up being a complete sweep. We didn't get much space saving in gossipd, even though we should save 24 bytes per node. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
neil saitug
parent
b4455d517c
commit
a2fa699e0e
@@ -2,6 +2,7 @@
|
||||
#include "../bech32.c"
|
||||
#include "../bech32_util.c"
|
||||
#include "../bolt11.c"
|
||||
#include "../node_id.c"
|
||||
#include "../hash_u5.c"
|
||||
#include <ccan/err/err.h>
|
||||
#include <ccan/mem/mem.h>
|
||||
@@ -10,9 +11,9 @@
|
||||
#include <wally_core.h>
|
||||
|
||||
/* AUTOGENERATED MOCKS START */
|
||||
/* Generated stub for fromwire_pubkey */
|
||||
void fromwire_pubkey(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, struct pubkey *pubkey UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_pubkey called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_node_id */
|
||||
void fromwire_node_id(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, struct node_id *id UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_node_id called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_short_channel_id */
|
||||
void fromwire_short_channel_id(const u8 **cursor UNNEEDED, size_t *max UNNEEDED,
|
||||
struct short_channel_id *short_channel_id UNNEEDED)
|
||||
@@ -23,9 +24,9 @@ u16 fromwire_u16(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
/* Generated stub for fromwire_u32 */
|
||||
u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for towire_pubkey */
|
||||
void towire_pubkey(u8 **pptr UNNEEDED, const struct pubkey *pubkey UNNEEDED)
|
||||
{ fprintf(stderr, "towire_pubkey called!\n"); abort(); }
|
||||
/* Generated stub for towire_node_id */
|
||||
void towire_node_id(u8 **pptr UNNEEDED, const struct node_id *id UNNEEDED)
|
||||
{ fprintf(stderr, "towire_node_id called!\n"); abort(); }
|
||||
/* Generated stub for towire_short_channel_id */
|
||||
void towire_short_channel_id(u8 **pptr UNNEEDED,
|
||||
const struct short_channel_id *short_channel_id UNNEEDED)
|
||||
@@ -36,6 +37,10 @@ void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED)
|
||||
/* Generated stub for towire_u32 */
|
||||
void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for type_to_string_ */
|
||||
const char *type_to_string_(const tal_t *ctx UNNEEDED, const char *typename UNNEEDED,
|
||||
union printable_types u UNNEEDED)
|
||||
{ fprintf(stderr, "type_to_string_ called!\n"); abort(); }
|
||||
/* AUTOGENERATED MOCKS END */
|
||||
|
||||
static struct privkey privkey;
|
||||
@@ -120,7 +125,7 @@ int main(void)
|
||||
setup_locale();
|
||||
|
||||
struct bolt11 *b11;
|
||||
struct pubkey node;
|
||||
struct node_id node;
|
||||
struct amount_msat msatoshi;
|
||||
const char *badstr;
|
||||
|
||||
@@ -144,7 +149,7 @@ int main(void)
|
||||
* > ### Please make a donation of any amount using payment_hash 0001020304050607080900010203040506070809000102030405060708090102 to me @03e7156ae33b0a208d0744199163177e909e80176e55d97a2f221ede0f934dd9ad
|
||||
* > lnbc1pvjluezpp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqdpl2pkx2ctnv5sxxmmwwd5kgetjypeh2ursdae8g6twvus8g6rfwvs8qun0dfjkxaq8rkx3yf5tcsyz3d73gafnh3cax9rn449d9p5uxz9ezhhypd0elx87sjle52x86fux2ypatgddc6k63n7erqz25le42c4u4ecky03ylcqca784w
|
||||
*/
|
||||
if (!pubkey_from_hexstr("03e7156ae33b0a208d0744199163177e909e80176e55d97a2f221ede0f934dd9ad", strlen("03e7156ae33b0a208d0744199163177e909e80176e55d97a2f221ede0f934dd9ad"), &node))
|
||||
if (!node_id_from_hexstr("03e7156ae33b0a208d0744199163177e909e80176e55d97a2f221ede0f934dd9ad", strlen("03e7156ae33b0a208d0744199163177e909e80176e55d97a2f221ede0f934dd9ad"), &node))
|
||||
abort();
|
||||
|
||||
/* BOLT #11:
|
||||
|
||||
@@ -28,6 +28,9 @@ void fromwire_bitcoin_txid(const u8 **cursor UNNEEDED, size_t *max UNNEEDED,
|
||||
/* Generated stub for fromwire_bool */
|
||||
bool fromwire_bool(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_bool called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_node_id */
|
||||
void fromwire_node_id(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, struct node_id *id UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_node_id called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_pubkey */
|
||||
void fromwire_pubkey(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, struct pubkey *pubkey UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_pubkey called!\n"); abort(); }
|
||||
@@ -46,6 +49,9 @@ void towire_bitcoin_txid(u8 **pptr UNNEEDED, const struct bitcoin_txid *txid UNN
|
||||
/* Generated stub for towire_bool */
|
||||
void towire_bool(u8 **pptr UNNEEDED, bool v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_bool called!\n"); abort(); }
|
||||
/* Generated stub for towire_node_id */
|
||||
void towire_node_id(u8 **pptr UNNEEDED, const struct node_id *id UNNEEDED)
|
||||
{ fprintf(stderr, "towire_node_id called!\n"); abort(); }
|
||||
/* Generated stub for towire_pubkey */
|
||||
void towire_pubkey(u8 **pptr UNNEEDED, const struct pubkey *pubkey UNNEEDED)
|
||||
{ fprintf(stderr, "towire_pubkey called!\n"); abort(); }
|
||||
|
||||
Reference in New Issue
Block a user