gossipd: send node announcement on startup.

I suspect this fixes #1660 too, but checking would be good.

Fixes: #1781
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-09-24 11:11:14 +09:30
committed by Christian Decker
parent cbd1d1d0f2
commit 0baa5f7071
3 changed files with 5 additions and 1 deletions

View File

@@ -37,6 +37,7 @@ changes.
- JSON RPC: `getroute` `fuzzpercent` and `pay` `maxfeepercent` can now be > 100.
- Protocol: fix occasional deadlock when both peers flood with gossip.
- Protocol: fix occasional long delay on sending `reply_short_channel_ids_end`.
- Protocol: re-send `node_announcement` when address/alias/color etc change.
### Security

View File

@@ -1803,6 +1803,10 @@ static struct io_plan *gossip_init(struct daemon_conn *master,
/* Now disable all local channels, they can't be connected yet. */
gossip_disable_local_channels(daemon);
/* If that announced channels, we can announce ourselves (options
* or addresses might have changed!) */
maybe_send_own_node_announce(daemon);
new_reltimer(&daemon->timers, daemon,
time_from_sec(daemon->rstate->prune_timeout/4),
gossip_refresh_network, daemon);

View File

@@ -842,7 +842,6 @@ def test_gossip_store_load(node_factory):
assert not l1.daemon.is_in_log('gossip_store.*truncating')
@pytest.mark.xfail(strict=True)
def test_node_reannounce(node_factory, bitcoind):
"Test that we reannounce a node when parameters change"
l1, l2, l3 = node_factory.line_graph(3, opts={'may_reconnect': True})