From 2a70739e6f83f7b7e3f4612a87b9507530b7a44d Mon Sep 17 00:00:00 2001 From: lash Date: Thu, 1 Feb 2018 15:59:55 +0100 Subject: [PATCH] swarm/storage: Clean up after rebase swarm-mutableresources-errors --- swarm/storage/resource.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swarm/storage/resource.go b/swarm/storage/resource.go index 310d4bd751..da6edb843c 100644 --- a/swarm/storage/resource.go +++ b/swarm/storage/resource.go @@ -566,7 +566,7 @@ func (self *ResourceHandler) parseUpdate(chunkdata []byte) (*Signature, uint32, func (self *ResourceHandler) UpdateMultihash(ctx context.Context, name string, data []byte) (Key, error) { if isMultihash(data) == 0 { - return nil, NewResourceError(ErrNoData, "Invalid multihash") + return nil, NewResourceError(ErrNothingToReturn, "Invalid multihash") } return self.update(ctx, name, data, true) } @@ -859,7 +859,7 @@ func (self *ResourceHandler) keyDataHash(key Key, data []byte) common.Hash { // if successful it returns the length of multihash data, 0 otherwise func isMultihash(data []byte) int { cursor := 0 - hashtype, c := binary.Uvarint(data) + _, c := binary.Uvarint(data) if c <= 0 { log.Warn("Corrupt multihash data, hashtype is unreadable") return 0