From 0064dde1ce780dcc48b55530709496e089c1fda6 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Tue, 7 Jan 2025 22:29:39 +0100 Subject: [PATCH] limit provided history by first seen --- solanaceae/ngc_hs2/ngc_hs2_sigma.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/solanaceae/ngc_hs2/ngc_hs2_sigma.cpp b/solanaceae/ngc_hs2/ngc_hs2_sigma.cpp index fa69a17..bf29c49 100644 --- a/solanaceae/ngc_hs2/ngc_hs2_sigma.cpp +++ b/solanaceae/ngc_hs2/ngc_hs2_sigma.cpp @@ -224,6 +224,13 @@ void NGCHS2Sigma::handleTimeRange(Contact3Handle c, const Events::NGCFT1_recv_re return; } + if (!c.all_of()) { + // make sure we dont sync past the peers first appearance + if (const auto first_seen_ptr = c.try_get(); first_seen_ptr != nullptr) { + ts_start = std::max(ts_start, first_seen_ptr->ts); + } + } + // dedupe insert into queue // how much overlap do we allow? c.get_or_emplace().queueRequest(