mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-03-15 15:39:09 +01:00
Update history bucket last_update time immediately on update
Now that we aren't decaying during scoring, when we set the last_updated time in the history bucket logic doesn't matter, so we should just update it when we've just updated the history buckets.
This commit is contained in:
parent
6f8838fe70
commit
5ac68c1af3
1 changed files with 1 additions and 2 deletions
|
@ -1318,6 +1318,7 @@ impl<L: DerefMut<Target = u64>, BRT: DerefMut<Target = HistoricalBucketRangeTrac
|
|||
self.liquidity_history.max_liquidity_offset_history.track_datapoint(
|
||||
max_liquidity_offset_msat.saturating_sub(bucket_offset_msat), self.capacity_msat
|
||||
);
|
||||
*self.offset_history_last_updated = self.now;
|
||||
}
|
||||
|
||||
/// Adjusts the lower bound of the channel liquidity balance in this direction.
|
||||
|
@ -1329,7 +1330,6 @@ impl<L: DerefMut<Target = u64>, BRT: DerefMut<Target = HistoricalBucketRangeTrac
|
|||
self.decayed_offset_msat(*self.max_liquidity_offset_msat)
|
||||
};
|
||||
*self.last_updated = self.now;
|
||||
*self.offset_history_last_updated = self.now;
|
||||
}
|
||||
|
||||
/// Adjusts the upper bound of the channel liquidity balance in this direction.
|
||||
|
@ -1341,7 +1341,6 @@ impl<L: DerefMut<Target = u64>, BRT: DerefMut<Target = HistoricalBucketRangeTrac
|
|||
self.decayed_offset_msat(*self.min_liquidity_offset_msat)
|
||||
};
|
||||
*self.last_updated = self.now;
|
||||
*self.offset_history_last_updated = self.now;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue