mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
gossipd: don't try to connect to non-routable addresses.
Someone could try to announce an internal address, and we might probe it. This breaks tests, so we add '--dev-allow-localhost' for our tests, so we don't eliminate that one. Of course, now we need to skip some more tests in non-developer mode. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
af065417e1
commit
d40d22b68e
@@ -162,6 +162,9 @@ struct routing_state {
|
||||
* restarts */
|
||||
struct gossip_store *store;
|
||||
|
||||
/* For testing, we announce and accept localhost */
|
||||
bool dev_allow_localhost;
|
||||
|
||||
/* A map of channels indexed by short_channel_ids */
|
||||
UINTMAP(struct chan *) chanmap;
|
||||
};
|
||||
@@ -183,7 +186,8 @@ struct route_hop {
|
||||
struct routing_state *new_routing_state(const tal_t *ctx,
|
||||
const struct bitcoin_blkid *chain_hash,
|
||||
const struct pubkey *local_id,
|
||||
u32 prune_timeout);
|
||||
u32 prune_timeout,
|
||||
bool dev_allow_localhost);
|
||||
|
||||
struct chan *new_chan(struct routing_state *rstate,
|
||||
const struct short_channel_id *scid,
|
||||
|
||||
Reference in New Issue
Block a user