From b52383b12394752e7c32d52caac86d7629783749 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 17 Feb 2024 04:05:42 -0500 Subject: [PATCH] refactor: add StorageProtocol to S5ProtocolResult --- protocols/s5/s5.go | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/protocols/s5/s5.go b/protocols/s5/s5.go index 4bc9473..bc5b51d 100644 --- a/protocols/s5/s5.go +++ b/protocols/s5/s5.go @@ -51,10 +51,11 @@ type S5ProtocolParams struct { type S5ProtocolResult struct { fx.Out - Protocol registry.Protocol `group:"protocol"` - S5Protocol *S5Protocol - S5NodeConfig *s5config.NodeConfig - Db *bolt.DB + Protocol registry.Protocol `group:"protocol"` + S5Protocol *S5Protocol + S5NodeConfig *s5config.NodeConfig + Db *bolt.DB + StorageProtocol storage.StorageProtocol } type S5ProviderStoreParams struct { @@ -92,10 +93,11 @@ func NewS5Protocol( } return S5ProtocolResult{ - Protocol: proto, - S5Protocol: proto, - S5NodeConfig: cfg, - Db: cfg.DB, + Protocol: proto, + S5Protocol: proto, + S5NodeConfig: cfg, + Db: cfg.DB, + StorageProtocol: GetStorageProtocol(proto), }, nil }