Skip to content

Commit d2ac683

Browse files
committed
Add a comment describing update_time_counter and when its updated
1 parent 391fbfb commit d2ac683

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lightning/src/ln/channel.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,9 +481,14 @@ pub(super) struct Channel<Signer: Sign> {
481481
holding_cell_update_fee: Option<u32>,
482482
next_holder_htlc_id: u64,
483483
next_counterparty_htlc_id: u64,
484-
update_time_counter: u32,
485484
feerate_per_kw: u32,
486485

486+
/// The timestamp set on our latest `channel_update` message for this channel. It is updated
487+
/// when the channel is updated in ways which may impact the `channel_update` message or when a
488+
/// new block is received, ensuring it's always at least moderately close to the current real
489+
/// time.
490+
update_time_counter: u32,
491+
487492
#[cfg(debug_assertions)]
488493
/// Max to_local and to_remote outputs in a locally-generated commitment transaction
489494
holder_max_commitment_tx_output: Mutex<(u64, u64)>,

0 commit comments

Comments
 (0)