@cryptotaxi247 / kubo / commits / c6ee2058d

comments from CR

License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>

Jeromy committed Jul 17, 2015 at 10:12 UTC c6ee2058d9a87b244cabfcc722f67ee85c2d26ed
4 files changed +6 -8
Godeps/Godeps.json
-4
@@ -166,11 +166,7 @@
166 },
167 {
168 "ImportPath": "github.com/jbenet/go-datastore",
169 -<<<<<<< HEAD
169 "Rev": "c835c30f206c1e97172e428f052e225adab9abde"
171 -=======
172 - "Rev": "47af23f2ad09237ccc09c586c118048e2b39b358"
173 ->>>>>>> fixup datastore interfaces
170 },
171 {
172 "ImportPath": "github.com/jbenet/go-detect-race",
blocks/blockstore/blockstore.go
+3 -1
@@ -52,9 +52,11 @@ type GCBlockstore interface {
52 }
53
54 func NewBlockstore(d ds.Batching) *blockstore {
55 + var dsb ds.Batching
56 dd := dsns.Wrap(d, BlockPrefix)
57 + dsb = dd
58 return &blockstore{
57 - datastore: dd,
59 + datastore: dsb,
60 }
61 }
62
core/corerouting/core.go
+1 -1
@@ -28,7 +28,7 @@ var (
28 // SupernodeServer returns a configuration for a routing server that stores
29 // routing records to the provided datastore. Only routing records are store in
30 // the datastore.
31 -func SupernodeServer(recordSource ds.ThreadSafeDatastore) core.RoutingOption {
31 +func SupernodeServer(recordSource ds.Datastore) core.RoutingOption {
32 return func(ctx context.Context, ph host.Host, dstore repo.Datastore) (routing.IpfsRouting, error) {
33 server, err := supernode.NewServer(recordSource, ph.Peerstore(), ph.ID())
34 if err != nil {
routing/supernode/server.go
+2 -2
@@ -18,13 +18,13 @@ import (
18 // Server handles routing queries using a database backend
19 type Server struct {
20 local peer.ID
21 - routingBackend datastore.ThreadSafeDatastore
21 + routingBackend datastore.Datastore
22 peerstore peer.Peerstore
23 *proxy.Loopback // so server can be injected into client
24 }
25
26 // 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) {
28 s := &Server{local, ds, ps, nil}
29 s.Loopback = &proxy.Loopback{
30 Handler: s,