mirror of
https://github.com/ipfs/kubo.git
synced 2025-09-09 19:32:24 +08:00
u.Hash - error
the u.Hash error can be safely ignored (panic) because multihash only fails from the selection of hash function. If the fn + length are valid, it won't error. cc @whyrusleeping
This commit is contained in:
@ -42,16 +42,9 @@ func (p *ipnsPublisher) Publish(k ci.PrivKey, value string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
nameb, err := u.Hash(pkbytes)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
nameb := u.Hash(pkbytes)
|
||||
namekey := u.Key(nameb).Pretty()
|
||||
|
||||
ipnskey, err := u.Hash([]byte("/ipns/" + namekey))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
ipnskey := u.Hash([]byte("/ipns/" + namekey))
|
||||
|
||||
// Store associated public key
|
||||
timectx, _ := context.WithDeadline(ctx, time.Now().Add(time.Second*4))
|
||||
|
Reference in New Issue
Block a user