Skip to content

Commit 33cebe0

Browse files
committed
f rewrite text
1 parent 5ceeb27 commit 33cebe0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lightning/src/routing/scoring.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,10 +1178,10 @@ impl<T: Time> Readable for ChannelLiquidity<T> {
11781178
(4, duration_since_epoch, required),
11791179
});
11801180
// On rust prior to 1.60 `Instant::duration_since` will panic if time goes backwards.
1181-
// Because we calculate "now" against wallclock time when we were written are reloading
1182-
// here, we may cause time to go backwards if wallclock time is before when we were
1183-
// written. Thus, we check if we'd end up with a time in the future and just use `now`
1184-
// instead to avoid panicing later.
1181+
// Because we write `last_updated` as wallclock time when we were written and create an
1182+
// `Instant` which represents that wallclock time, we may hit that panic if wallclock time
1183+
// is before when we were written. Thus, we check if we'd end up with a time in the future
1184+
// and just use `now` instead to avoid panicing later.
11851185
let wall_clock_now = T::duration_since_epoch();
11861186
let now = T::now();
11871187
let last_updated = if wall_clock_now > duration_since_epoch {

0 commit comments

Comments
 (0)