From: Matt Corallo Date: Tue, 16 Nov 2021 20:55:10 +0000 (+0000) Subject: Add a comment describing `update_time_counter` and when its updated X-Git-Tag: v0.0.104~8^2~1 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=d2ac683f4e6267b1ae8997a97b1c1dec1cd540c2;p=rust-lightning Add a comment describing `update_time_counter` and when its updated --- diff --git a/lightning/src/ln/channel.rs b/lightning/src/ln/channel.rs index 0cf7995bc..55dd76cc0 100644 --- a/lightning/src/ln/channel.rs +++ b/lightning/src/ln/channel.rs @@ -481,9 +481,14 @@ pub(super) struct Channel { holding_cell_update_fee: Option, next_holder_htlc_id: u64, next_counterparty_htlc_id: u64, - update_time_counter: u32, feerate_per_kw: u32, + /// The timestamp set on our latest `channel_update` message for this channel. It is updated + /// when the channel is updated in ways which may impact the `channel_update` message or when a + /// new block is received, ensuring it's always at least moderately close to the current real + /// time. + update_time_counter: u32, + #[cfg(debug_assertions)] /// Max to_local and to_remote outputs in a locally-generated commitment transaction holder_max_commitment_tx_output: Mutex<(u64, u64)>,