From 5ad91ad263f01830623958141a7e7c8523bee85f Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Thu, 4 May 2023 04:11:11 -0400 Subject: [PATCH] fix: upstream renterd updates --- renterd/internal/node/node.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/renterd/internal/node/node.go b/renterd/internal/node/node.go index edbd1ee..3b4f6fa 100644 --- a/renterd/internal/node/node.go +++ b/renterd/internal/node/node.go @@ -39,8 +39,8 @@ type WorkerConfig struct { SessionTTL time.Duration DownloadSectorTimeout time.Duration UploadSectorTimeout time.Duration - DownloadMaxOverdrive int - UploadMaxOverdrive int + DownloadMaxOverdrive uint64 + UploadMaxOverdrive uint64 } type BusConfig struct { @@ -284,7 +284,11 @@ func NewBus(cfg BusConfig, dir string, seed types.PrivateKey, l *zap.Logger) (ht func NewWorker(cfg WorkerConfig, b worker.Bus, seed types.PrivateKey, l *zap.Logger) (http.Handler, ShutdownFn, error) { workerKey := blake2b.Sum256(append([]byte("worker"), seed...)) - w := worker.New(workerKey, cfg.ID, b, cfg.ContractLockTimeout, cfg.SessionLockTimeout, cfg.SessionReconnectTimeout, cfg.SessionTTL, cfg.BusFlushInterval, cfg.DownloadSectorTimeout, cfg.UploadSectorTimeout, cfg.DownloadMaxOverdrive, cfg.UploadMaxOverdrive, l) + w, err := worker.New(workerKey, cfg.ID, b, cfg.ContractLockTimeout, cfg.SessionLockTimeout, cfg.SessionReconnectTimeout, cfg.SessionTTL, cfg.BusFlushInterval, cfg.DownloadSectorTimeout, cfg.UploadSectorTimeout, cfg.DownloadMaxOverdrive, cfg.UploadMaxOverdrive, l) + if err != nil { + return nil, nil, err + } + return w.Handler(), w.Shutdown, nil }