refactor(core): WallClockStore trait replaces the store_mut backdoor

Task 10b reached LogStore::set_wall_clock through a general Node::store_mut.
Kyle: replace it with a narrower accessor. A WallClockStore trait (set_wall_clock
+ peer_time_estimate, implemented only by LogStore) now backs Node::set_wall_clock
and Node::peer_time_estimate, so no &mut Store escapes the facade.
This commit is contained in:
2026-10-22 08:44:09 -07:00
parent a43a4966e1
commit ef539b494f
7 changed files with 58 additions and 17 deletions
+2 -2
View File
@@ -223,10 +223,10 @@ impl TinesNode {
if self.clock.is_trusted() {
return;
}
let Some(est) = self.tines.store_mut().peer_time_estimate(now) else {
let Some(est) = self.tines.peer_time_estimate(now) else {
return;
};
let report = self.tines.store_mut().set_wall_clock(est, now);
let report = self.tines.set_wall_clock(est, now);
self.clock.anchor_wall(est, now);
match report.downtime_ms {
Some(ms) => println!("tines: trusted wall clock from peer (folded {ms} ms downtime)"),