Skip to content

Commit cd1b8eb

Browse files
committed
Update comments
1 parent bd19b0f commit cd1b8eb

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/ln/channel.rs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,15 +286,22 @@ pub(super) struct Channel {
286286
pending_outbound_htlcs: Vec<OutboundHTLCOutput>,
287287
holding_cell_htlc_updates: Vec<HTLCUpdateAwaitingACK>,
288288

289-
// pending_update_fee is filled when sending and receiving update_fee
290-
// For outbound channel, feerate_per_kw is upadated with the value from
289+
// pending_update_fee is filled when sending and receiving update_fee
290+
// For outbound channel, feerate_per_kw is updated with the value from
291291
// pending_update_fee when revoke_and_ack is received
292+
//
292293
// For inbound channel, feerate_per_kw is updated when it receives
293-
// commitment_signed when pending_update_fee.is_some().
294+
// commitment_signed and revoke_and_ack is generated
295+
// The pending value is kept when another pair of update_fee and commitment_signed
296+
// is received during AwaitingRemoteRevoke and relieved when the expected
297+
// revoke_and_ack is received and new commitment_signed is generated to be
298+
// sent to the funder. Otherwise, the pending value is removed when receiving
299+
// commitment_signed.
294300
pending_update_fee: Option<u64>,
295301
// update_fee() during ChannelState::AwaitingRemoteRevoke is hold in
296302
// holdina_cell_update_fee then moved to pending_udpate_fee when revoke_and_ack
297-
// is received.
303+
// is received. holding_cell_update_fee is updated when there are additional
304+
// update_fee() during ChannelState::AwaitingRemoteRevoke.
298305
holding_cell_update_fee: Option<u64>,
299306
next_local_htlc_id: u64,
300307
next_remote_htlc_id: u64,

0 commit comments

Comments
 (0)