@cryptotaxi247 / kubo / commits / c0a18d9c0

fix(test): nil Blockstore

License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>

Brian Tiger Chow committed Dec 16, 2014 at 20:26 UTC c0a18d9c08b54a17bfbfc6ec9214f9267df5746e
1 file changed +5 -3
exchange/bitswap/strategy/ledgermanager_test.go
+5 -3
@@ -4,9 +4,11 @@ import (
4 "strings"
5 "testing"
6
7 - "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context"
8 -
7 + context "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context"
8 + ds "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore"
9 + sync "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/sync"
10 blocks "github.com/jbenet/go-ipfs/blocks"
11 + blockstore "github.com/jbenet/go-ipfs/blocks/blockstore"
12 message "github.com/jbenet/go-ipfs/exchange/bitswap/message"
13 peer "github.com/jbenet/go-ipfs/peer"
14 testutil "github.com/jbenet/go-ipfs/util/testutil"
@@ -21,7 +23,7 @@ func newPeerAndLedgermanager(idStr string) peerAndLedgermanager {
23 return peerAndLedgermanager{
24 Peer: testutil.NewPeerWithIDString(idStr),
25 //Strategy: New(true),
24 - ls: NewLedgerManager(nil, context.TODO()),
26 + ls: NewLedgerManager(blockstore.NewBlockstore(sync.MutexWrap(ds.NewMapDatastore())), context.TODO()),
27 }
28 }
29