From 43eb8c3e9a4abbddf422e327d00bcc3d9165e2e7 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Tue, 27 Feb 2024 03:35:43 -0500 Subject: [PATCH] refactor: add ctx to protocol Init --- protocols/registry/registry.go | 2 +- protocols/s5/s5.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/protocols/registry/registry.go b/protocols/registry/registry.go index eca6276..eb5c7c6 100644 --- a/protocols/registry/registry.go +++ b/protocols/registry/registry.go @@ -12,7 +12,7 @@ const GroupName = "protocols" type Protocol interface { Name() string - Init() error + Init(ctx context.Context) error Start(ctx context.Context) error Stop(ctx context.Context) error Config() config.ProtocolConfig diff --git a/protocols/s5/s5.go b/protocols/s5/s5.go index 0698479..067f76e 100644 --- a/protocols/s5/s5.go +++ b/protocols/s5/s5.go @@ -166,10 +166,10 @@ func NewS5ProviderStore(params S5ProviderStoreParams) *S5ProviderStore { } } -func (s *S5Protocol) Init() error { +func (s *S5Protocol) Init(ctx context.Context) error { s.node.Services().Storage().SetProviderStore(s.store) - err := s.node.Init() + err := s.node.Init(ctx) if err != nil { return err }