MCPcopy Create free account
hub / github.com/ElementsProject/lightning / opt_add_bind_addr

Function opt_add_bind_addr

lightningd/options.c:356–373  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

354}
355
356static char *opt_add_bind_addr(const char *arg, struct lightningd *ld)
357{
358 struct wireaddr_internal addr;
359
360 /* handle in case you used the bind option with an .onion */
361 if (parse_wireaddr_internal(arg, &addr, 0, true, false, true, NULL)) {
362 if (addr.itype == ADDR_INTERNAL_WIREADDR &&
363 addr.u.wireaddr.type == ADDR_TYPE_TOR_V3) {
364 log_unusual(ld->log, "You used `--bind-addr=%s` option with an .onion address,"
365 " You are lucky in this node live some wizards and"
366 " fairies, we have done this for you and don't announce, Be as hidden as wished",
367 arg);
368 return NULL;
369 }
370 }
371 /* the intended call */
372 return opt_add_addr_withtype(arg, ld, ADDR_LISTEN, true);
373}
374
375static void opt_show_u64(char buf[OPT_SHOW_LEN], const u64 *u)
376{

Callers

nothing calls this directly

Calls 2

parse_wireaddr_internalFunction · 0.85
opt_add_addr_withtypeFunction · 0.85

Tested by

no test coverage detected