From 69bed0a0bf42f5d496e2260122dc44c0264afc83 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Wed, 24 Jan 2024 02:58:55 -0500 Subject: [PATCH] refactor: AddStorageLocation doesn't need a config argument --- interfaces/node.go | 2 +- node/node.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/interfaces/node.go b/interfaces/node.go index 6ee921b..d5dfdf6 100644 --- a/interfaces/node.go +++ b/interfaces/node.go @@ -22,7 +22,7 @@ type Node interface { Db() *bolt.DB Start() error GetCachedStorageLocations(hash *encoding.Multihash, kinds []types.StorageLocationType) (map[string]StorageLocation, error) - AddStorageLocation(hash *encoding.Multihash, nodeId *encoding.NodeId, location StorageLocation, message []byte, config *config.NodeConfig) error + AddStorageLocation(hash *encoding.Multihash, nodeId *encoding.NodeId, location StorageLocation, message []byte) error NetworkId() string DownloadBytesByHash(hash *encoding.Multihash) ([]byte, error) DownloadBytesByCID(cid *encoding.CID) (bytes []byte, err error) diff --git a/node/node.go b/node/node.go index 553175f..6a3f893 100644 --- a/node/node.go +++ b/node/node.go @@ -189,7 +189,7 @@ func (n *NodeImpl) readStorageLocationsFromDB(hash *encoding.Multihash) (storage return locationMap, nil } -func (n *NodeImpl) AddStorageLocation(hash *encoding.Multihash, nodeId *encoding.NodeId, location interfaces.StorageLocation, message []byte, config *config.NodeConfig) error { +func (n *NodeImpl) AddStorageLocation(hash *encoding.Multihash, nodeId *encoding.NodeId, location interfaces.StorageLocation, message []byte) error { // Read existing storage locations locationDb, err := n.readStorageLocationsFromDB(hash) if err != nil {