Christian Decker
477b537bad
gossip: Do not clear peer in gossipd when it's handed off
2017-03-13 11:26:48 +01:00
Rusty Russell
5dc8cb12be
lightningd/gossip: convert to subd.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-03-11 07:19:40 +10:30
Christian Decker
5277787db5
gossip: Do not cleanup broadcast messages
...
Freeing the messages results in a use-after-free when the next peer
attempts to synchronize.
2017-03-09 11:16:37 +01:00
Rusty Russell
a845b07ada
lightningd/cryptomsg: only free written messages if they're marked take().
...
This fixes a leak in gossip, too.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-03-07 11:38:20 +10:30
Rusty Russell
fd258fe495
lightningd: wire up opening daemon.
...
Now we can actually open a channel.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-02-24 16:22:56 +10:30
Rusty Russell
edc30b12ea
lightningd: --dev-debugger=<subdaemon>
...
Or for blackbox tests --gdb1=<subdaemon> / --gdb2=<subdaemon>.
This makes the subdaemon wait as soon as it's execed, so we can attach
the debugger.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-02-24 16:22:56 +10:30
Rusty Russell
90737371d0
lightningd/cryptomsg: split raw crypto_state vs peer_crypto_state
...
Raw crypto_state is what we send across the wire: the peer one is for
use in async crypto io routines (peer_read_message/peer_write_message).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-02-24 16:22:56 +10:30
Christian Decker
8912272983
gossip: Prevent normal messages to trigger the staggered broadcast
...
Only call `peer_dump_gossip` if the broadcast timer actually
expired. previously it could get triggered by any normal message.
2017-02-21 17:59:34 +01:00
Christian Decker
fccab6411d
gossip: Add timer and normal queue for messages
...
The peer is woken up every 30 seconds to deliver the backlog of
messages. Additionally I added the normal message queue to be able to
send non-gossip message to the peer.
2017-02-21 17:59:34 +01:00
Christian Decker
83f51fe965
gossip: Add timer support to the io_loop
2017-02-21 17:59:34 +01:00
Rusty Russell
9fd40da38c
generate-wire: don't hand unknown structures specially.
...
It's awkward to handle them differently. But this change means we
need to expose them to the generated code.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-02-21 15:15:19 +10:30
Rusty Russell
4ed259c46c
gen_peer_wire_csv: update for latest spec.
...
We have a separate announcement_signatures message now.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-02-07 12:14:14 +10:30
Christian Decker
fb814a7a9e
gossip: Adding announcement handling to the gossip subdaemon.
...
We now have all the pieces to wire in the handling functionality to
the new gossip subdaemon.
2017-02-03 05:52:11 +10:30
Rusty Russell
21a5c62ead
lightningd_gossip: daemon to look after peers which don't a channel (yet)
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-01-10 15:38:33 +10:30