mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
b2ea4cfd66
Some of the struct array helpers need to allocate data when deserializing their fields. The `getnodes` reply is one such example that allocates the hostname. Since the change to calling array helpers the getnodes call was broken because it was attempting to allocate off of the entry, which did not have a tal header, thus failing.
16 lines
479 B
C
16 lines
479 B
C
#ifndef LIGHTNING_LIGHTNINGD_GOSSIP_MSG_H
|
|
#define LIGHTNING_LIGHTNINGD_GOSSIP_MSG_H
|
|
#include "config.h"
|
|
#include <bitcoin/pubkey.h>
|
|
|
|
struct gossip_getnodes_entry {
|
|
struct pubkey nodeid;
|
|
char *hostname;
|
|
u16 port;
|
|
};
|
|
|
|
void fromwire_gossip_getnodes_entry(const tal_t *ctx, const u8 **pptr, size_t *max, struct gossip_getnodes_entry *entry);
|
|
void towire_gossip_getnodes_entry(u8 **pptr, const struct gossip_getnodes_entry *entry);
|
|
|
|
#endif /* LIGHTNING_LIGHTGNINGD_GOSSIP_MSG_H */
|