BOLT #10: * * The DNS seed: * ... * - upon receiving a _node_ query: * - MUST select the record matching the `node_id`, if any, AND return all * addresses associated with that node. */
| 1592 | * addresses associated with that node. |
| 1593 | */ |
| 1594 | static const char **seednames(const tal_t *ctx, const struct node_id *id) |
| 1595 | { |
| 1596 | char bech32[100]; |
| 1597 | u5 *data = tal_arr(ctx, u5, 0); |
| 1598 | const char **seednames = tal_arr(ctx, const char *, 0); |
| 1599 | |
| 1600 | bech32_push_bits(&data, id->k, ARRAY_SIZE(id->k)*8); |
| 1601 | bech32_encode(bech32, "ln", data, tal_count(data), sizeof(bech32), |
| 1602 | BECH32_ENCODING_BECH32); |
| 1603 | /* This is cdecker's seed */ |
| 1604 | tal_arr_expand(&seednames, tal_fmt(seednames, "%s.lseed.bitcoinstats.com", bech32)); |
| 1605 | /* This is darosior's seed */ |
| 1606 | tal_arr_expand(&seednames, tal_fmt(seednames, "%s.lseed.darosior.ninja", bech32)); |
| 1607 | return seednames; |
| 1608 | } |
| 1609 | |
| 1610 | /*~ As a last resort, we do a DNS lookup to the lightning DNS seed to |
| 1611 | * resolve a node name when they say to connect to it. This is synchronous, |
no test coverage detected