refactor: AddStorageLocation doesn't need a config argument
This commit is contained in:
parent
34bb591bfe
commit
69bed0a0bf
|
@ -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)
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue