mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
channeld: allow gossipd to push error msgs through us.
We already have the code to close the channel if we've sent an error. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
ee63ae8efa
commit
c8294c4091
@@ -314,7 +314,12 @@ static void gossip_in(struct peer *peer, const u8 *msg)
|
|||||||
|
|
||||||
if (is_msg_for_gossipd(gossip))
|
if (is_msg_for_gossipd(gossip))
|
||||||
enqueue_peer_msg(peer, gossip);
|
enqueue_peer_msg(peer, gossip);
|
||||||
else
|
else if (fromwire_peektype(gossip) == WIRE_ERROR) {
|
||||||
|
struct channel_id channel_id;
|
||||||
|
char *what = sanitize_error(msg, msg, &channel_id);
|
||||||
|
peer_failed(&peer->cs, peer->gossip_index, &channel_id,
|
||||||
|
"gossipd said: %s", what);
|
||||||
|
} else
|
||||||
status_failed(STATUS_FAIL_GOSSIP_IO,
|
status_failed(STATUS_FAIL_GOSSIP_IO,
|
||||||
"Got bad message type %s from gossipd: %s",
|
"Got bad message type %s from gossipd: %s",
|
||||||
wire_type_name(fromwire_peektype(gossip)),
|
wire_type_name(fromwire_peektype(gossip)),
|
||||||
|
|||||||
Reference in New Issue
Block a user