core-lightning/closingd/closingd_wire.csv
niftynei 864f2f3e21 channel_id: save to database, dont derive from funding_txid
v2 channel open uses a different method to derive the channel_id, so now
we save it to the database so that we dont have to remember how to
derive it for each.

includes a migration for existing channels
2020-09-09 19:54:20 +09:30

2.0 KiB

1#include <bitcoin/tx.h>
2#include <common/channel_id.h>
3#include <common/cryptomsg.h>
4#include <common/htlc_wire.h>
5#include <common/per_peer_state.h>
6# Begin! (passes peer fd, gossipd-client fd)
7msgtype,closingd_init,2001
8msgdata,closingd_init,chainparams,chainparams,
9msgdata,closingd_init,pps,per_peer_state,
10msgdata,closingd_init,channel_id,channel_id,
11msgdata,closingd_init,funding_txid,bitcoin_txid,
12msgdata,closingd_init,funding_txout,u16,
13msgdata,closingd_init,funding_satoshi,amount_sat,
14msgdata,closingd_init,local_fundingkey,pubkey,
15msgdata,closingd_init,remote_fundingkey,pubkey,
16msgdata,closingd_init,opener,enum side,
17msgdata,closingd_init,local_sat,amount_sat,
18msgdata,closingd_init,remote_sat,amount_sat,
19msgdata,closingd_init,our_dust_limit,amount_sat,
20msgdata,closingd_init,min_fee_satoshi,amount_sat,
21msgdata,closingd_init,fee_limit_satoshi,amount_sat,
22msgdata,closingd_init,initial_fee_satoshi,amount_sat,
23msgdata,closingd_init,local_scriptpubkey_len,u16,
24msgdata,closingd_init,local_scriptpubkey,u8,local_scriptpubkey_len
25msgdata,closingd_init,remote_scriptpubkey_len,u16,
26msgdata,closingd_init,remote_scriptpubkey,u8,remote_scriptpubkey_len
27msgdata,closingd_init,fee_negotiation_step,u64,
28msgdata,closingd_init,fee_negotiation_step_unit,u8,
29msgdata,closingd_init,reconnected,bool,
30msgdata,closingd_init,next_index_local,u64,
31msgdata,closingd_init,next_index_remote,u64,
32msgdata,closingd_init,revocations_received,u64,
33msgdata,closingd_init,channel_reestablish_len,u16,
34msgdata,closingd_init,channel_reestablish,u8,channel_reestablish_len
35msgdata,closingd_init,last_remote_secret,secret,
36msgdata,closingd_init,dev_fast_gossip,bool,
37# We received an offer, save signature.
38msgtype,closingd_received_signature,2002
39msgdata,closingd_received_signature,signature,bitcoin_signature,
40msgdata,closingd_received_signature,tx,bitcoin_tx,
41msgtype,closingd_received_signature_reply,2102
42msgdata,closingd_received_signature_reply,closing_txid,bitcoin_txid,
43# Negotiations complete, we're exiting.
44msgtype,closingd_complete,2004