From e99335e5b306de979bfa85f6ebbd8f61e374b61d Mon Sep 17 00:00:00 2001 From: niftynei Date: Mon, 26 Oct 2020 22:27:33 -0500 Subject: [PATCH] df: move tx_role functions (used in next patch) --- channeld/channeld.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/channeld/channeld.c b/channeld/channeld.c index 9788b0a36..69bc133ab 100644 --- a/channeld/channeld.c +++ b/channeld/channeld.c @@ -259,7 +259,19 @@ static const u8 *hsm_req(const tal_t *ctx, const u8 *req TAKES) return msg; } +static enum tx_role their_tx_role(const struct peer *peer) +{ + return peer->channel->opener == LOCAL ? + TX_ACCEPTER : TX_INITIATOR; +} + #if EXPERIMENTAL_FEATURES +static enum tx_role our_tx_role(const struct peer *peer) +{ + return peer->channel->opener == LOCAL ? + TX_INITIATOR : TX_ACCEPTER; +} + static const u8 *psbt_to_tx_sigs_msg(const tal_t *ctx, struct channel *channel, const struct wally_psbt *psbt) @@ -518,20 +530,6 @@ static void announce_channel(struct peer *peer) send_channel_update(peer, 0); } -#if EXPERIMENTAL_FEATURES -static enum tx_role our_tx_role(const struct peer *peer) -{ - return peer->channel->opener == LOCAL ? - TX_INITIATOR : TX_ACCEPTER; -} -#endif - -static enum tx_role their_tx_role(const struct peer *peer) -{ - return peer->channel->opener == LOCAL ? - TX_ACCEPTER : TX_INITIATOR; -} - static void channel_announcement_negotiate(struct peer *peer) { /* Don't do any announcement work if we're shutting down */