fix(hosts): pass the plausible wall range to the store
Both hosts open LogStore with plausible_wall_ms(PLAUSIBLE_WALL_MS), so a forged out-of-range peer estimate is dropped before the store picks the latest and can't hide an honest one (decision J, review B3). Un-ignores latest_estimate_wins_over_smallest_age now that the store returns the latest estimate, and adds forged_estimate_does_not_hide_an_honest_one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -172,7 +172,10 @@ impl TinesNode {
|
||||
let executor = context.create_basic_executor();
|
||||
let node = executor.create_node("tines")?;
|
||||
|
||||
let store = LogStore::open(log_path, 0)?;
|
||||
// Peer estimates outside the plausible range don't count (decision J).
|
||||
let store = LogStore::builder(log_path)
|
||||
.plausible_wall_ms(tines::trust::PLAUSIBLE_WALL_MS)
|
||||
.open(0)?;
|
||||
let transport = BtTransport::new(me, peer, radio);
|
||||
let tines = TinesNodeCore::new(me, store.first_seq(), store, transport);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user