refactor: AddStorageLocation doesn't need a config argument

This commit is contained in:
Derrick Hammer 2024-01-24 02:58:55 -05:00
parent 34bb591bfe
commit 69bed0a0bf
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ type Node interface {
Db() *bolt.DB Db() *bolt.DB
Start() error Start() error
GetCachedStorageLocations(hash *encoding.Multihash, kinds []types.StorageLocationType) (map[string]StorageLocation, 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 NetworkId() string
DownloadBytesByHash(hash *encoding.Multihash) ([]byte, error) DownloadBytesByHash(hash *encoding.Multihash) ([]byte, error)
DownloadBytesByCID(cid *encoding.CID) (bytes []byte, err error) DownloadBytesByCID(cid *encoding.CID) (bytes []byte, err error)

View File

@ -189,7 +189,7 @@ func (n *NodeImpl) readStorageLocationsFromDB(hash *encoding.Multihash) (storage
return locationMap, nil 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 // Read existing storage locations
locationDb, err := n.readStorageLocationsFromDB(hash) locationDb, err := n.readStorageLocationsFromDB(hash)
if err != nil { if err != nil {