From f6dc2c1d537d9c205bb8e67ecad09f85eeca119c Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Tue, 9 Jan 2024 16:14:31 -0500 Subject: [PATCH] fix: we are checking value's length and i dont know why or where this came from... --- node/node.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/node/node.go b/node/node.go index 1077af3..dc936ad 100644 --- a/node/node.go +++ b/node/node.go @@ -127,10 +127,6 @@ func (n *NodeImpl) GetCachedStorageLocations(hash *encoding.Multihash, kinds []t } for key, value := range nodeMap { - if len(value) < 4 { - continue - } - expiry, ok := value[3].(int64) if !ok || expiry < ts { continue @@ -155,10 +151,9 @@ func (n *NodeImpl) GetCachedStorageLocations(hash *encoding.Multihash, kinds []t } storageLocation := storage.NewStorageLocation(int(t), addresses, expiry) - if len(value) > 4 { - if providerMessage, ok := value[4].([]byte); ok { - (storageLocation).SetProviderMessage(providerMessage) - } + + if providerMessage, ok := value[4].([]byte); ok { + (storageLocation).SetProviderMessage(providerMessage) } locations[key] = storageLocation