| 308 | } |
| 309 | |
| 310 | static 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 | |
| 329 | static char *opt_subdaemon(const char *arg, struct lightningd *ld) |
| 330 | { |
no test coverage detected