From be9bb4e23354204be0fa491379fe5329fc310453 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Tue, 2 Sep 2025 10:53:49 +0200 Subject: [PATCH] small flow stuff and hs fix --- solanaceae/ngc_ft1/cubic.hpp | 5 ++--- solanaceae/ngc_ft1/flow_only.cpp | 2 +- solanaceae/ngc_ft1/flow_only.hpp | 2 +- solanaceae/ngc_hs2/ngc_hs2_rizzler.cpp | 6 ++++++ 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/solanaceae/ngc_ft1/cubic.hpp b/solanaceae/ngc_ft1/cubic.hpp index 241d1c3..3d09903 100644 --- a/solanaceae/ngc_ft1/cubic.hpp +++ b/solanaceae/ngc_ft1/cubic.hpp @@ -29,9 +29,8 @@ struct CUBIC : public FlowOnly { float getWindow(void) const override; - // TODO: api for how much data we should send - // take time since last sent into account - // respect max_byterate_allowed + // takes time since last sent into account + // respects max_byterate_allowed int64_t canSend(float time_delta) override; }; diff --git a/solanaceae/ngc_ft1/flow_only.cpp b/solanaceae/ngc_ft1/flow_only.cpp index 7f45ec2..2135dd7 100644 --- a/solanaceae/ngc_ft1/flow_only.cpp +++ b/solanaceae/ngc_ft1/flow_only.cpp @@ -33,7 +33,7 @@ void FlowOnly::updateWindow(void) { void FlowOnly::updateCongestion(void) { updateWindow(); - const auto tmp_window = getWindow(); + const auto tmp_window = FlowOnly::getWindow(); // packet window * 0.3 // but atleast 4 int32_t max_consecutive_events = std::clamp( diff --git a/solanaceae/ngc_ft1/flow_only.hpp b/solanaceae/ngc_ft1/flow_only.hpp index 6e4d5f7..d0bdc79 100644 --- a/solanaceae/ngc_ft1/flow_only.hpp +++ b/solanaceae/ngc_ft1/flow_only.hpp @@ -52,7 +52,7 @@ struct FlowOnly : public CCAI { float getCurrentDelay(void) const override; // call updateWindow() to update this value - float getWindow(void) const override; + virtual float getWindow(void) const override; void addRTT(float new_delay); diff --git a/solanaceae/ngc_hs2/ngc_hs2_rizzler.cpp b/solanaceae/ngc_hs2/ngc_hs2_rizzler.cpp index 52df963..2eff277 100644 --- a/solanaceae/ngc_hs2/ngc_hs2_rizzler.cpp +++ b/solanaceae/ngc_hs2/ngc_hs2_rizzler.cpp @@ -246,6 +246,12 @@ void NGCHS2Rizzler::handleMsgPack(ContactHandle4 sync_by_c, const std::vector(from_c, parent); _cs.throwEventConstruct(from_c); + } else if (!cr.all_of(from_c)) { + std::cerr << "NGCHS2Rizzler warning: from contact missing parent, assuming and force constructing! find and fix the cause!\n"; + // TODO: only if public message + // we require this for file messages + cr.emplace_or_replace(from_c, parent); + _cs.throwEventUpdate(from_c); } }