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

Function opt_add_addr

lightningd/options.c:310–327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

308}
309
310static char *opt_add_addr(const char *arg, struct lightningd *ld)
311{
312 struct wireaddr_internal addr;
313
314 /* handle in case you used the addr option with an .onion */
315 if (parse_wireaddr_internal(arg, &addr, 0, true, false, true, NULL)) {
316 if (addr.itype == ADDR_INTERNAL_WIREADDR &&
317 addr.u.wireaddr.type == ADDR_TYPE_TOR_V3) {
318 log_unusual(ld->log, "You used `--addr=%s` option with an .onion address, please use"
319 " `--announce-addr` ! You are lucky in this node live some wizards and"
320 " fairies, we have done this for you and announce, Be as hidden as wished",
321 arg);
322 return opt_add_announce_addr(arg, ld);
323 }
324 }
325 /* the intended call */
326 return opt_add_addr_withtype(arg, ld, ADDR_LISTEN_AND_ANNOUNCE, true);
327}
328
329static char *opt_subdaemon(const char *arg, struct lightningd *ld)
330{

Callers 1

opt_add_announce_addrFunction · 0.85

Calls 3

parse_wireaddr_internalFunction · 0.85
opt_add_announce_addrFunction · 0.85
opt_add_addr_withtypeFunction · 0.85

Tested by

no test coverage detected