1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-09 19:32:24 +08:00

switch DHT entries over to be records, test currently fail

This commit is contained in:
Jeromy
2014-11-09 23:45:16 -08:00
committed by Juan Batiz-Benet
parent e290b54d9e
commit 33985c530e
9 changed files with 231 additions and 31 deletions

View File

@ -49,7 +49,7 @@ func (p *ipnsPublisher) Publish(k ci.PrivKey, value string) error {
nameb := u.Hash(pkbytes)
namekey := u.Key(nameb).Pretty()
ipnskey := u.Hash([]byte("/ipns/" + namekey))
ipnskey := []byte("/ipns/" + namekey)
// Store associated public key
timectx, _ := context.WithDeadline(ctx, time.Now().Add(time.Second*4))
@ -58,7 +58,7 @@ func (p *ipnsPublisher) Publish(k ci.PrivKey, value string) error {
return err
}
// Store ipns entry at h("/ipns/"+b58(h(pubkey)))
// Store ipns entry at "/ipns/"+b58(h(pubkey))
timectx, _ = context.WithDeadline(ctx, time.Now().Add(time.Second*4))
err = p.routing.PutValue(timectx, u.Key(ipnskey), data)
if err != nil {