@@ -9,11 +9,9 @@ import (
9
9
proto "github.com/gogo/protobuf/proto"
10
10
ds "github.com/ipfs/go-datastore"
11
11
dsquery "github.com/ipfs/go-datastore/query"
12
- pin "github.com/ipfs/go-ipfs-pinner"
13
12
ipns "github.com/ipfs/go-ipns"
14
13
pb "github.com/ipfs/go-ipns/pb"
15
14
path "github.com/ipfs/go-path"
16
- ft "github.com/ipfs/go-unixfs"
17
15
ci "github.com/libp2p/go-libp2p-core/crypto"
18
16
peer "github.com/libp2p/go-libp2p-core/peer"
19
17
routing "github.com/libp2p/go-libp2p-core/routing"
@@ -294,27 +292,6 @@ func PublishEntry(ctx context.Context, r routing.ValueStore, ipnskey string, rec
294
292
return r .PutValue (ctx , ipnskey , data )
295
293
}
296
294
297
- // InitializeKeyspace sets the ipns record for the given key to
298
- // point to an empty directory.
299
- // TODO: this doesnt feel like it belongs here
300
- func InitializeKeyspace (ctx context.Context , pub Publisher , pins pin.Pinner , key ci.PrivKey ) error {
301
- emptyDir := ft .EmptyDirNode ()
302
-
303
- // pin recursively because this might already be pinned
304
- // and doing a direct pin would throw an error in that case
305
- err := pins .Pin (ctx , emptyDir , true )
306
- if err != nil {
307
- return err
308
- }
309
-
310
- err = pins .Flush (ctx )
311
- if err != nil {
312
- return err
313
- }
314
-
315
- return pub .Publish (ctx , key , path .FromCid (emptyDir .Cid ()))
316
- }
317
-
318
295
// PkKeyForID returns the public key routing key for the given peer ID.
319
296
func PkKeyForID (id peer.ID ) string {
320
297
return "/pk/" + string (id )
0 commit comments