Rusty Russell
a52d522525
gossipd: handle ping messages for remote peers too.
This simplifies our ping handling: make gossipd always do it.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
6c6da45f53
wire: Update to lastest BOLT draft.
This includes the gossip query messages.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
practicalswift
6269a4c55d
Remove unused functions not covered by unit tests
7 years ago
Rusty Russell
61f048bbf1
gossip: rename is_gossip_msg to is_msg_for_gossipd.
We're going to expand the range of messages which go through gossipd
when we support queries.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
e92b710406
tools/generate-wire.py: remove length argument from fromwire_ routines.
We always hand in "NULL" (which means use tal_len on the msg), except
for two places which do that manually for no good reason.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
2bc2502b23
wire: move extract_channel_id to here.
It can be useful for other daemons.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Christian Decker
fa6e53bb08
Move short_channel_id primitive into bitcoin
Not really a bitcoin primitive but the place where we keep all the
small stuff currently.
8 years ago
Rusty Russell
d492f3872c
wire/peer_wire: rename gossip_msg / unknown_msg / unknown_msg_discardable
The next patch includes wire/peer_wire.h and causes a compile error
as lightningd/gossip_control.c defined its own gossip_msg function.
New names are clearer.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
996567c250
lightningd: update BOLT to add channel_reestablish message.
We don't handle it yet though.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Christian Decker
05e951d748
wire: Correct the short channel id serialization to use 3+3+2
Fixes the `short_channel_id` being serialized as 4 bytes block height,
3 bytes transaction index and 1 byte output number, to use 3+3+2 as
the spec says.
The reordering in the unit test structs is mainly to be able to still
use `eq_upto` for tests.
8 years ago
Rusty Russell
a12a670d85
opening: don't die if we get a gossip packet.
Using 'taskset -c 0' I managed to slow down pytest enough to trigger this
locally.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
d5be8d26f2
lightningd/ping: ping support.
A spec update brings ping support.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
4839916038
lightningd/cryptomsg: discard unknown odd messages internally.
This saves all callers having to handle it.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago