Skip to content

Commit

Permalink
common/socket_close: remove now only connectd talks to peer.
Browse files Browse the repository at this point in the history
connectd does this internally now using ccan/io, with appropriate
credit for ZmnSCPxj who wrote this code in the first place.

Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed Jan 24, 2022
1 parent 3281d72 commit be299c0
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 78 deletions.
1 change: 0 additions & 1 deletion closingd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ CLOSINGD_COMMON_OBJS := \
common/status_wiregen.o \
common/read_peer_msg.o \
common/setup.o \
common/socket_close.o \
common/status.o \
common/status_wire.o \
common/subdaemon.o \
Expand Down
6 changes: 1 addition & 5 deletions closingd/closingd.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <common/peer_io.h>
#include <common/per_peer_state.h>
#include <common/read_peer_msg.h>
#include <common/socket_close.h>
#include <common/status.h>
#include <common/subdaemon.h>
#include <common/type_to_string.h>
Expand Down Expand Up @@ -1097,10 +1096,7 @@ int main(int argc, char *argv[])
#endif

/* We're done! */
/* Properly close the channel first. */
if (!socket_close(pps->peer_fd))
status_unusual("Closing and draining peerfd gave error: %s",
strerror(errno));

/* Sending the below will kill us! */
wire_sync_write(REQ_FD, take(towire_closingd_complete(NULL)));
tal_free(ctx);
Expand Down
1 change: 0 additions & 1 deletion common/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ COMMON_SRC_NOGEN := \
common/route.c \
common/setup.c \
common/shutdown_scriptpubkey.c \
common/socket_close.c \
common/sphinx.c \
common/status.c \
common/status_levels.c \
Expand Down
48 changes: 0 additions & 48 deletions common/socket_close.c

This file was deleted.

23 changes: 0 additions & 23 deletions common/socket_close.h

This file was deleted.

0 comments on commit be299c0

Please sign in to comment.