df: move tx_role functions (used in next patch)

This commit is contained in:
niftynei
2020-10-26 22:27:33 -05:00
committed by neil saitug
parent cce3e717d9
commit e99335e5b3

View File

@@ -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 */