fix: we are checking value's length and i dont know why or where this came from...
This commit is contained in:
parent
5ed286a639
commit
f6dc2c1d53
|
@ -127,10 +127,6 @@ func (n *NodeImpl) GetCachedStorageLocations(hash *encoding.Multihash, kinds []t
|
||||||
}
|
}
|
||||||
|
|
||||||
for key, value := range nodeMap {
|
for key, value := range nodeMap {
|
||||||
if len(value) < 4 {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
expiry, ok := value[3].(int64)
|
expiry, ok := value[3].(int64)
|
||||||
if !ok || expiry < ts {
|
if !ok || expiry < ts {
|
||||||
continue
|
continue
|
||||||
|
@ -155,11 +151,10 @@ func (n *NodeImpl) GetCachedStorageLocations(hash *encoding.Multihash, kinds []t
|
||||||
}
|
}
|
||||||
|
|
||||||
storageLocation := storage.NewStorageLocation(int(t), addresses, expiry)
|
storageLocation := storage.NewStorageLocation(int(t), addresses, expiry)
|
||||||
if len(value) > 4 {
|
|
||||||
if providerMessage, ok := value[4].([]byte); ok {
|
if providerMessage, ok := value[4].([]byte); ok {
|
||||||
(storageLocation).SetProviderMessage(providerMessage)
|
(storageLocation).SetProviderMessage(providerMessage)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
locations[key] = storageLocation
|
locations[key] = storageLocation
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue