core-lightning/common/scb_wire.csv
Rusty Russell 1b6ff0b2fc staticbackup: don't use wireaddr_internal.
This is an internal type: it has no API guarantees (indeed, I'm about
to change it, which is how I discovered scb was using it).

Fortunately for every case we care about, it is actually a wireaddr
(in theory the peer can connect locally using a local socket, but this
is mostly for testing and is a very strange setup, and so simply don't
do scb for those).

In this case, the wire encoding is a single byte followed by the
wireaddr, so open-code that in scb_wire.csv for compatibility.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-06-01 09:28:39 +09:30

766 B

1#include <common/node_id.h>
2#include <common/channel_id.h>
3#include <common/wireaddr.h>
4#include <common/channel_type.h>
5#include <common/amount.h>
6#include <bitcoin/tx.h>
7# scb_chan stores min. info required to sweep the peer's force close.
8subtype,scb_chan
9subtypedata,scb_chan,id,u64,
10subtypedata,scb_chan,cid,channel_id,
11subtypedata,scb_chan,node_id,node_id,
12subtypedata,scb_chan,unused,u8,
13subtypedata,scb_chan,addr,wireaddr,
14subtypedata,scb_chan,funding,bitcoin_outpoint,
15subtypedata,scb_chan,funding_sats,amount_sat,
16subtypedata,scb_chan,type,channel_type,
17msgtype,static_chan_backup,6135,
18msgdata,static_chan_backup,version,u64,
19msgdata,static_chan_backup,timestamp,u32,
20msgdata,static_chan_backup,num,u16,
21msgdata,static_chan_backup,channels,scb_chan,num