mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-01 03:24:41 +01:00
ab9d9ef3b8
(This was sitting in my gossip-enchancement patch queue, but it simplifies
this set too, so I moved it here).
In 94711969f
we added an explicit gossip_index so when gossipd gets
peers back from other daemons, it knows what gossip it has sent (since
gossipd can send gossip after the other daemon is already complete).
This solution is insufficient for the more general case where gossipd
wants to send other messages reliably, so replace it with the other
solution: have gossipd drain the "gossip fd" which the daemon returns.
This turns out to be quite simple, and is probably how I should have
done it originally :(
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
1.4 KiB
1.4 KiB
1 | #include <common/cryptomsg.h> |
---|---|
2 | #include <common/htlc_wire.h> |
3 | # Begin! (passes peer fd, gossipd-client fd) |
4 | closing_init,2001 |
5 | closing_init,,crypto_state,struct crypto_state |
6 | closing_init,,seed,struct privkey |
7 | closing_init,,funding_txid,struct bitcoin_txid |
8 | closing_init,,funding_txout,u16 |
9 | closing_init,,funding_satoshi,u64 |
10 | closing_init,,remote_fundingkey,struct pubkey |
11 | closing_init,,funder,enum side |
12 | closing_init,,local_msatoshi,u64 |
13 | closing_init,,remote_msatoshi,u64 |
14 | closing_init,,our_dust_limit,u64 |
15 | closing_init,,min_fee_satoshi,u64 |
16 | closing_init,,fee_limit_satoshi,u64 |
17 | closing_init,,initial_fee_satoshi,u64 |
18 | closing_init,,local_scriptpubkey_len,u16 |
19 | closing_init,,local_scriptpubkey,local_scriptpubkey_len*u8 |
20 | closing_init,,remote_scriptpubkey_len,u16 |
21 | closing_init,,remote_scriptpubkey,remote_scriptpubkey_len*u8 |
22 | closing_init,,reconnected,bool |
23 | closing_init,,next_index_local,u64 |
24 | closing_init,,next_index_remote,u64 |
25 | closing_init,,revocations_received,u64 |
26 | # This means we allow closing negotiations out of bounds. |
27 | closing_init,,deprecated_api,bool |
28 | closing_init,,channel_reestablish_len,u16 |
29 | closing_init,,channel_reestablish,channel_reestablish_len*u8 |
30 | # We received an offer, save signature. |
31 | closing_received_signature,2002 |
32 | closing_received_signature,,signature,secp256k1_ecdsa_signature |
33 | closing_received_signature,,tx,struct bitcoin_tx |
34 | closing_received_signature_reply,2102 |
35 | # Negotiations complete, we're exiting. |
36 | closing_complete,2004 |