1
0
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:
Jeromy
2015-07-10 10:49:19 -07:00
parent 5123857c4b
commit 16c4d8cdcb
4 changed files with 115 additions and 39 deletions

View File

@ -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)