Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle connection better: make connectd know which peers are important #7630

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions common/wireaddr.c
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,14 @@ void wireaddr_from_sockname(struct wireaddr_internal *addr,
strncpy(addr->u.sockname, sockname, sizeof(addr->u.sockname)-1);
}

void wireaddr_internal_from_wireaddr(struct wireaddr_internal *addr,
const struct wireaddr *waddr)
{
addr->itype = ADDR_INTERNAL_WIREADDR;
addr->u.wireaddr.is_websocket = false;
addr->u.wireaddr.wireaddr = *waddr;
}

bool wireaddr_to_sockname(const struct wireaddr_internal *addr,
struct sockaddr_un *sun)
{
Expand Down
3 changes: 3 additions & 0 deletions common/wireaddr.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ char *fmt_wireaddr_internal(const tal_t *ctx,
bool wireaddr_from_unresolved(struct wireaddr_internal *addr,
const char *name, u16 port);

void wireaddr_internal_from_wireaddr(struct wireaddr_internal *addr,
const struct wireaddr *waddr);

void wireaddr_from_sockname(struct wireaddr_internal *addr,
const char *sockname);
bool wireaddr_to_sockname(const struct wireaddr_internal *addr,
Expand Down
Loading
Loading