mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-09 16:14:19 +01:00
channeld: get local peer features from lightningd.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -59,6 +59,8 @@ channel_init,,init_peer_pkt_len,u16
|
||||
channel_init,,init_peer_pkt,init_peer_pkt_len*u8
|
||||
channel_init,,reached_announce_depth,bool
|
||||
channel_init,,last_remote_secret,struct secret
|
||||
channel_init,,lflen,u16
|
||||
channel_init,,localfeatures,lflen*u8
|
||||
|
||||
# master->channeld funding hit new depth >= lock depth
|
||||
channel_funding_locked,1002
|
||||
|
||||
|
@@ -68,6 +68,9 @@ struct peer {
|
||||
bool funding_locked[NUM_SIDES];
|
||||
u64 next_index[NUM_SIDES];
|
||||
|
||||
/* Features peer supports. */
|
||||
u8 *localfeatures;
|
||||
|
||||
/* Tolerable amounts for feerate (only relevant for fundee). */
|
||||
u32 feerate_min, feerate_max;
|
||||
|
||||
@@ -2654,7 +2657,8 @@ static void init_channel(struct peer *peer)
|
||||
&peer->channel_flags,
|
||||
&funding_signed,
|
||||
&peer->announce_depth_reached,
|
||||
&last_remote_per_commit_secret))
|
||||
&last_remote_per_commit_secret,
|
||||
&peer->localfeatures))
|
||||
master_badmsg(WIRE_CHANNEL_INIT, msg);
|
||||
|
||||
status_trace("init %s: remote_per_commit = %s, old_remote_per_commit = %s"
|
||||
|
||||
@@ -381,7 +381,8 @@ void peer_start_channeld(struct channel *channel,
|
||||
channel->channel_flags,
|
||||
funding_signed,
|
||||
reached_announce_depth,
|
||||
&last_remote_per_commit_secret);
|
||||
&last_remote_per_commit_secret,
|
||||
channel->peer->localfeatures);
|
||||
|
||||
/* We don't expect a response: we are triggered by funding_depth_cb. */
|
||||
subd_send_msg(channel->owner, take(initmsg));
|
||||
|
||||
Reference in New Issue
Block a user