From 74568a1c5019ea886e044583a71077c9a8ebb1d6 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 9 Aug 2018 09:56:30 +0930 Subject: [PATCH] lightningd: peer_start_channeld always returns true; make it void. It is always true, and we always ignore it. Signed-off-by: Rusty Russell --- lightningd/channel_control.c | 6 ++---- lightningd/channel_control.h | 2 +- wallet/test/run-wallet.c | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lightningd/channel_control.c b/lightningd/channel_control.c index 4e6982a67..aebaf0657 100644 --- a/lightningd/channel_control.c +++ b/lightningd/channel_control.c @@ -169,7 +169,7 @@ static unsigned channel_msg(struct subd *sd, const u8 *msg, const int *fds) return 0; } -bool peer_start_channeld(struct channel *channel, +void peer_start_channeld(struct channel *channel, const struct crypto_state *cs, int peer_fd, int gossip_fd, const u8 *funding_signed, @@ -213,7 +213,7 @@ bool peer_start_channeld(struct channel *channel, log_unusual(channel->log, "Could not subdaemon channel: %s", strerror(errno)); channel_fail_transient(channel, "Failed to subdaemon channel"); - return true; + return; } peer_htlcs(tmpctx, channel, &htlcs, &htlc_states, &fulfilled_htlcs, @@ -288,8 +288,6 @@ bool peer_start_channeld(struct channel *channel, /* We don't expect a response: we are triggered by funding_depth_cb. */ subd_send_msg(channel->owner, take(initmsg)); - - return true; } bool channel_tell_funding_locked(struct lightningd *ld, diff --git a/lightningd/channel_control.h b/lightningd/channel_control.h index 72928d46e..8d6d8f738 100644 --- a/lightningd/channel_control.h +++ b/lightningd/channel_control.h @@ -8,7 +8,7 @@ struct channel; struct crypto_state; struct lightningd; -bool peer_start_channeld(struct channel *channel, +void peer_start_channeld(struct channel *channel, const struct crypto_state *cs, int peer_fd, int gossip_fd, const u8 *funding_signed, diff --git a/wallet/test/run-wallet.c b/wallet/test/run-wallet.c index 224582b7b..9d5ae4706 100644 --- a/wallet/test/run-wallet.c +++ b/wallet/test/run-wallet.c @@ -289,7 +289,7 @@ bool param(struct command *cmd UNNEEDED, const char *buffer UNNEEDED, const jsmntok_t params[] UNNEEDED, ...) { fprintf(stderr, "param called!\n"); abort(); } /* Generated stub for peer_start_channeld */ -bool peer_start_channeld(struct channel *channel UNNEEDED, +void peer_start_channeld(struct channel *channel UNNEEDED, const struct crypto_state *cs UNNEEDED, int peer_fd UNNEEDED, int gossip_fd UNNEEDED, const u8 *funding_signed UNNEEDED,