mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
9de3827199
We revert to a simple select() loop. This makes things simpler, and fixes the problem where we want to exit but we've partially read a peer packet. We still queue up outgoing peer packets for non-blocking send: if we went full sync there, we'd risk deadlock if both sides wrote a huge number of packets and neither was reading. This also greatly simplifies the next patches, where we want to make our first get/response from gossipd. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
149 lines
5.0 KiB
Plaintext
149 lines
5.0 KiB
Plaintext
init,16
|
|
init,0,gflen,2
|
|
init,2,globalfeatures,gflen
|
|
init,2+gflen,lflen,2
|
|
init,4+gflen,localfeatures,lflen
|
|
error,17
|
|
error,0,channel_id,32
|
|
error,32,len,2
|
|
error,34,data,len
|
|
ping,18
|
|
ping,0,num_pong_bytes,2
|
|
ping,2,byteslen,2
|
|
ping,4,ignored,byteslen
|
|
pong,19
|
|
pong,0,byteslen,2
|
|
pong,2,ignored,byteslen
|
|
open_channel,32
|
|
open_channel,0,chain_hash,32
|
|
open_channel,32,temporary_channel_id,32
|
|
open_channel,64,funding_satoshis,8
|
|
open_channel,72,push_msat,8
|
|
open_channel,80,dust_limit_satoshis,8
|
|
open_channel,88,max_htlc_value_in_flight_msat,8
|
|
open_channel,96,channel_reserve_satoshis,8
|
|
open_channel,104,htlc_minimum_msat,8
|
|
open_channel,112,feerate_per_kw,4
|
|
open_channel,116,to_self_delay,2
|
|
open_channel,118,max_accepted_htlcs,2
|
|
open_channel,120,funding_pubkey,33
|
|
open_channel,153,revocation_basepoint,33
|
|
open_channel,186,payment_basepoint,33
|
|
open_channel,219,delayed_payment_basepoint,33
|
|
open_channel,252,htlc_basepoint,33
|
|
open_channel,285,first_per_commitment_point,33
|
|
open_channel,318,channel_flags,1
|
|
open_channel,319,shutdown_len,2,option_upfront_shutdown_script
|
|
accept_channel,33
|
|
accept_channel,0,temporary_channel_id,32
|
|
accept_channel,32,dust_limit_satoshis,8
|
|
accept_channel,40,max_htlc_value_in_flight_msat,8
|
|
accept_channel,48,channel_reserve_satoshis,8
|
|
accept_channel,56,htlc_minimum_msat,8
|
|
accept_channel,64,minimum_depth,4
|
|
accept_channel,68,to_self_delay,2
|
|
accept_channel,70,max_accepted_htlcs,2
|
|
accept_channel,72,funding_pubkey,33
|
|
accept_channel,105,revocation_basepoint,33
|
|
accept_channel,138,payment_basepoint,33
|
|
accept_channel,171,delayed_payment_basepoint,33
|
|
accept_channel,204,htlc_basepoint,33
|
|
accept_channel,237,first_per_commitment_point,33
|
|
accept_channel,270,shutdown_len,2,option_upfront_shutdown_script
|
|
funding_created,34
|
|
funding_created,0,temporary_channel_id,32
|
|
funding_created,32,funding_txid,32
|
|
funding_created,64,funding_output_index,2
|
|
funding_created,66,signature,64
|
|
funding_signed,35
|
|
funding_signed,0,channel_id,32
|
|
funding_signed,32,signature,64
|
|
funding_locked,36
|
|
funding_locked,0,channel_id,32
|
|
funding_locked,32,next_per_commitment_point,33
|
|
shutdown,38
|
|
shutdown,0,channel_id,32
|
|
shutdown,32,len,2
|
|
shutdown,34,scriptpubkey,len
|
|
closing_signed,39
|
|
closing_signed,0,channel_id,32
|
|
closing_signed,32,fee_satoshis,8
|
|
closing_signed,40,signature,64
|
|
update_add_htlc,128
|
|
update_add_htlc,0,channel_id,32
|
|
update_add_htlc,32,id,8
|
|
update_add_htlc,40,amount_msat,8
|
|
update_add_htlc,48,payment_hash,32
|
|
update_add_htlc,80,cltv_expiry,4
|
|
update_add_htlc,84,onion_routing_packet,1366
|
|
update_fulfill_htlc,130
|
|
update_fulfill_htlc,0,channel_id,32
|
|
update_fulfill_htlc,32,id,8
|
|
update_fulfill_htlc,40,payment_preimage,32
|
|
update_fail_htlc,131
|
|
update_fail_htlc,0,channel_id,32
|
|
update_fail_htlc,32,id,8
|
|
update_fail_htlc,40,len,2
|
|
update_fail_htlc,42,reason,len
|
|
update_fail_malformed_htlc,135
|
|
update_fail_malformed_htlc,0,channel_id,32
|
|
update_fail_malformed_htlc,32,id,8
|
|
update_fail_malformed_htlc,40,sha256_of_onion,32
|
|
update_fail_malformed_htlc,72,failure_code,2
|
|
commitment_signed,132
|
|
commitment_signed,0,channel_id,32
|
|
commitment_signed,32,signature,64
|
|
commitment_signed,96,num_htlcs,2
|
|
commitment_signed,98,htlc_signature,num_htlcs*64
|
|
revoke_and_ack,133
|
|
revoke_and_ack,0,channel_id,32
|
|
revoke_and_ack,32,per_commitment_secret,32
|
|
revoke_and_ack,64,next_per_commitment_point,33
|
|
update_fee,134
|
|
update_fee,0,channel_id,32
|
|
update_fee,32,feerate_per_kw,4
|
|
channel_reestablish,136
|
|
channel_reestablish,0,channel_id,32
|
|
channel_reestablish,32,next_local_commitment_number,8
|
|
channel_reestablish,40,next_remote_revocation_number,8
|
|
channel_reestablish,48,your_last_per_commitment_secret,32,option-data-loss-protect
|
|
channel_reestablish,80,my_current_per_commitment_point,33,option-data-loss-protect
|
|
announcement_signatures,259
|
|
announcement_signatures,0,channel_id,32
|
|
announcement_signatures,32,short_channel_id,8
|
|
announcement_signatures,40,node_signature,64
|
|
announcement_signatures,104,bitcoin_signature,64
|
|
channel_announcement,256
|
|
channel_announcement,0,node_signature_1,64
|
|
channel_announcement,64,node_signature_2,64
|
|
channel_announcement,128,bitcoin_signature_1,64
|
|
channel_announcement,192,bitcoin_signature_2,64
|
|
channel_announcement,256,len,2
|
|
channel_announcement,258,features,len
|
|
channel_announcement,258+len,chain_hash,32
|
|
channel_announcement,290+len,short_channel_id,8
|
|
channel_announcement,298+len,node_id_1,33
|
|
channel_announcement,331+len,node_id_2,33
|
|
channel_announcement,364+len,bitcoin_key_1,33
|
|
channel_announcement,397+len,bitcoin_key_2,33
|
|
node_announcement,257
|
|
node_announcement,0,signature,64
|
|
node_announcement,64,flen,2
|
|
node_announcement,66,features,flen
|
|
node_announcement,66+flen,timestamp,4
|
|
node_announcement,70+flen,node_id,33
|
|
node_announcement,103+flen,rgb_color,3
|
|
node_announcement,106+flen,alias,32
|
|
node_announcement,138+flen,addrlen,2
|
|
node_announcement,140+flen,addresses,addrlen
|
|
channel_update,258
|
|
channel_update,0,signature,64
|
|
channel_update,64,chain_hash,32
|
|
channel_update,96,short_channel_id,8
|
|
channel_update,104,timestamp,4
|
|
channel_update,108,flags,2
|
|
channel_update,110,cltv_expiry_delta,2
|
|
channel_update,112,htlc_minimum_msat,8
|
|
channel_update,120,fee_base_msat,4
|
|
channel_update,124,fee_proportional_millionths,4
|