From 5ace9a28731b3a10fcb0c47f5fa1580fda05535d Mon Sep 17 00:00:00 2001 From: Hein Meling Date: Sun, 16 Nov 2025 02:18:36 +0100 Subject: [PATCH] chore: remove synchronizer/options.go; replaced by DynamicDuration The Params struct is replace by DynamicDuration, so the options.go is no longer used and thus not needed. Fixes #271 --- protocol/synchronizer/options.go | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 protocol/synchronizer/options.go diff --git a/protocol/synchronizer/options.go b/protocol/synchronizer/options.go deleted file mode 100644 index e59a19332..000000000 --- a/protocol/synchronizer/options.go +++ /dev/null @@ -1,29 +0,0 @@ -package synchronizer - -import "time" - -type Params struct { - sampleSize uint64 - startTimeout float64 - maxTimeout float64 - multiplier float64 -} - -func NewParams( - sampleSize uint32, - startTimeout time.Duration, - maxTimeout time.Duration, - multiplier float32, -) Params { - return Params{ - sampleSize: uint64(sampleSize), - startTimeout: float64(startTimeout.Nanoseconds()) / float64(time.Millisecond), - maxTimeout: float64(maxTimeout.Nanoseconds()) / float64(time.Millisecond), - multiplier: float64(multiplier), - } -} - -// StartTimeout returns the initial timeout duration. -func (opt Params) StartTimeout() time.Duration { - return time.Duration(opt.startTimeout) * time.Millisecond -}