mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-17 19:03:42 +01:00
masterd: Peer has to know which direction an eventual channel is
Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
parent
4f4b0e9bba
commit
d14969ce77
@ -2095,6 +2095,8 @@ static bool peer_start_channeld(struct peer *peer,
|
||||
if (peer->ld->config.ignore_fee_limits)
|
||||
log_debug(peer->log, "Ignoring fee limits!");
|
||||
|
||||
peer->direction = pubkey_cmp(&peer->ld->id, &peer->id) > 0;
|
||||
|
||||
initmsg = towire_channel_init(tmpctx,
|
||||
&get_chainparams(peer->ld)
|
||||
->genesis_blockhash,
|
||||
|
@ -100,6 +100,9 @@ struct peer {
|
||||
struct changed_htlc *last_sent_commit;
|
||||
|
||||
struct wallet_channel *channel;
|
||||
|
||||
/* If we open a channel our direction will be this */
|
||||
u8 direction;
|
||||
};
|
||||
|
||||
static inline bool peer_can_add_htlc(const struct peer *peer)
|
||||
|
Loading…
Reference in New Issue
Block a user