Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f06caf3

Browse files
committedJul 17, 2015
comments from CR
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
1 parent 2457d9c commit f06caf3

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed
 

‎core/corerouting/core.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ var (
2828
// SupernodeServer returns a configuration for a routing server that stores
2929
// routing records to the provided datastore. Only routing records are store in
3030
// the datastore.
31-
func SupernodeServer(recordSource ds.ThreadSafeDatastore) core.RoutingOption {
31+
func SupernodeServer(recordSource ds.Datastore) core.RoutingOption {
3232
return func(ctx context.Context, ph host.Host, dstore repo.Datastore) (routing.IpfsRouting, error) {
3333
server, err := supernode.NewServer(recordSource, ph.Peerstore(), ph.ID())
3434
if err != nil {

‎repo/repo.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ type Repo interface {
2222
// Datastore is the interface required from a datastore to be
2323
// acceptable to FSRepo.
2424
type Datastore interface {
25-
ds.Datastore // should be threadsafe, just be careful
26-
Batch() (ds.Batch, error)
27-
Close() error
25+
ds.Batching // should be threadsafe, just be careful
26+
io.Closer
2827
}

‎routing/supernode/server.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ import (
1818
// Server handles routing queries using a database backend
1919
type Server struct {
2020
local peer.ID
21-
routingBackend datastore.ThreadSafeDatastore
21+
routingBackend datastore.Datastore
2222
peerstore peer.Peerstore
2323
*proxy.Loopback // so server can be injected into client
2424
}
2525

2626
// NewServer creates a new Supernode routing Server
27-
func NewServer(ds datastore.ThreadSafeDatastore, ps peer.Peerstore, local peer.ID) (*Server, error) {
27+
func NewServer(ds datastore.Datastore, ps peer.Peerstore, local peer.ID) (*Server, error) {
2828
s := &Server{local, ds, ps, nil}
2929
s.Loopback = &proxy.Loopback{
3030
Handler: s,

0 commit comments

Comments
 (0)
Please sign in to comment.