mirror of
https://github.com/ipfs/kubo.git
synced 2025-08-02 01:11:24 +08:00
addressing comments from CR
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
This commit is contained in:
@ -10,7 +10,6 @@ import (
|
||||
|
||||
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/sync"
|
||||
"github.com/ipfs/go-ipfs/blocks/blockstore"
|
||||
key "github.com/ipfs/go-ipfs/blocks/key"
|
||||
bs "github.com/ipfs/go-ipfs/blockservice"
|
||||
"github.com/ipfs/go-ipfs/exchange/offline"
|
||||
imp "github.com/ipfs/go-ipfs/importer"
|
||||
@ -564,20 +563,6 @@ func TestCorrectPinning(t *testing.T) {
|
||||
|
||||
}
|
||||
|
||||
func enumerateChildren(t *testing.T, nd *mdag.Node, ds mdag.DAGService) []key.Key {
|
||||
var out []key.Key
|
||||
for _, lnk := range nd.Links {
|
||||
out = append(out, key.Key(lnk.Hash))
|
||||
child, err := lnk.GetNode(context.Background(), ds)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
children := enumerateChildren(t, child, ds)
|
||||
out = append(out, children...)
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
func BenchmarkDagmodWrite(b *testing.B) {
|
||||
b.StopTimer()
|
||||
dserv, pins := getMockDagServ(b)
|
||||
|
Reference in New Issue
Block a user