Browse Source

channeld: don't use ccan/io, go sync.

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>
ppa-0.6.1
Rusty Russell 7 years ago
committed by Christian Decker
parent
commit
9de3827199
  1. 556
      channeld/channel.c
  2. 2
      wire/gen_peer_wire_csv

556
channeld/channel.c

File diff suppressed because it is too large

2
wire/gen_peer_wire_csv

@ -33,6 +33,7 @@ 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
@ -48,6 +49,7 @@ 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

Loading…
Cancel
Save