core-lightning/gossipd/gossip_wire.csv
Rusty Russell 247d249ea8 gossipd: provide helper to get a channels cupdate, create routine to use it.
The idea is that gossipd can give us the cupdate we need for an error, and
we wire things up so that we ask for it (async) just before we send the
error to the subdaemon.

I tried many other things, but they were all too high-risk.

1. We need to ask gossipd every time, since it produces these lazily
   (in particular, it doesn't actually generate an offline update unless
   the channel is used).
2. We can't do async calls in random places, since we'll end up with
   an HTLC in limbo.  What if another path tries to fail it at the same time?
3. This allows us to use a temporary_node_failure error, and upgrade it
   when gossipd replies.  This doesn't change any existing assumptions.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-02-28 09:44:47 +10:30

5.9 KiB

1#include <common/cryptomsg.h>
2#include <common/wireaddr.h>
3#include <wire/gen_onion_wire.h>
4# Initialize the gossip daemon.
5# Pass JSON-RPC getnodes call through
6#include <lightningd/gossip_msg.h>
7# Pass JSON-RPC getroute call through
8# Ping/pong test. Waits for a reply if it expects one.
9# False if id in gossip_ping was unknown.
10# 0 == no pong expected
11# Set artificial maximum reply_channel_range size. Master->gossipd
12# gossipd->master: we're closing this channel.
13# Gossipd->master get this tx output please.
14# master->gossipd an htlc failed with this onion error.
15# master -> gossipd: stop gossip timers.
16# master -> gossipd: do you have a memleak?
17# master -> gossipd: please rewrite the gossip_store
18# gossipd -> master: ok
19#include <common/bolt11.h>
20# master -> gossipd: get route_info for our incoming channels
21# gossipd -> master: here they are.
22# master -> gossipd: blockheight increased.