Commit 929e4cb9 authored by Tommi Virtanen's avatar Tommi Virtanen Committed by Jeromy

fsrepo: Refactor to extract datastore internals

License: MIT
Signed-off-by: default avatarTommi Virtanen <tv@eagain.net>
parent e0459748
......@@ -44,7 +44,7 @@ type IpfsDHT struct {
self peer.ID // Local peer (yourself)
peerstore peer.Peerstore // Peer Registry
datastore ds.ThreadSafeDatastore // Local data
datastore ds.Datastore // Local data
routingTable *kb.RoutingTable // Array of routing tables for differently distanced nodes
providers *ProviderManager
......@@ -60,7 +60,7 @@ type IpfsDHT struct {
}
// NewDHT creates a new DHT object with the given peer as the 'local' host
func NewDHT(ctx context.Context, h host.Host, dstore ds.ThreadSafeDatastore) *IpfsDHT {
func NewDHT(ctx context.Context, h host.Host, dstore ds.Datastore) *IpfsDHT {
dht := new(IpfsDHT)
dht.datastore = dstore
dht.self = h.ID()
......
......@@ -47,7 +47,7 @@ func (c *nilclient) Bootstrap(_ context.Context) error {
return nil
}
func ConstructNilRouting(_ context.Context, _ p2phost.Host, _ ds.ThreadSafeDatastore) (routing.IpfsRouting, error) {
func ConstructNilRouting(_ context.Context, _ p2phost.Host, _ ds.Datastore) (routing.IpfsRouting, error) {
return &nilclient{}, nil
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment