mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-22 08:34:20 +01:00
channeld: print out error msg if we receive one.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
477a529856
commit
db1b9ffb61
@@ -61,6 +61,7 @@ CHANNELD_COMMON_OBJS := \
|
|||||||
common/utils.o \
|
common/utils.o \
|
||||||
common/utxo.o \
|
common/utxo.o \
|
||||||
common/version.o \
|
common/version.o \
|
||||||
|
common/wire_error.o \
|
||||||
common/wireaddr.o \
|
common/wireaddr.o \
|
||||||
gossipd/gen_gossip_wire.o \
|
gossipd/gen_gossip_wire.o \
|
||||||
lightningd/gossip_msg.o \
|
lightningd/gossip_msg.o \
|
||||||
|
|||||||
@@ -41,6 +41,7 @@
|
|||||||
#include <common/timeout.h>
|
#include <common/timeout.h>
|
||||||
#include <common/type_to_string.h>
|
#include <common/type_to_string.h>
|
||||||
#include <common/version.h>
|
#include <common/version.h>
|
||||||
|
#include <common/wire_error.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <gossipd/gen_gossip_wire.h>
|
#include <gossipd/gen_gossip_wire.h>
|
||||||
@@ -1469,8 +1470,14 @@ static void peer_in(struct peer *peer, const u8 *msg)
|
|||||||
handle_peer_shutdown(peer, msg);
|
handle_peer_shutdown(peer, msg);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case WIRE_INIT:
|
|
||||||
case WIRE_ERROR:
|
case WIRE_ERROR:
|
||||||
|
peer_failed(PEER_FD,
|
||||||
|
&peer->cs,
|
||||||
|
&peer->channel_id,
|
||||||
|
"Peer sent error %s",
|
||||||
|
sanitize_error(peer, msg, NULL));
|
||||||
|
|
||||||
|
case WIRE_INIT:
|
||||||
case WIRE_OPEN_CHANNEL:
|
case WIRE_OPEN_CHANNEL:
|
||||||
case WIRE_ACCEPT_CHANNEL:
|
case WIRE_ACCEPT_CHANNEL:
|
||||||
case WIRE_FUNDING_CREATED:
|
case WIRE_FUNDING_CREATED:
|
||||||
|
|||||||
Reference in New Issue
Block a user