提交 caa00b7e 编写于 作者: A aron

swarm/storage: remove panic on invalid chunk

上级 78c04c92
......@@ -399,7 +399,7 @@ func (s *DbStore) Get(key Key) (chunk *Chunk, err error) {
hash := hasher.Sum(nil)
if !bytes.Equal(hash, key) {
s.delete(index.Idx, getIndexKey(key))
panic("Invalid Chunk in Database. Please repair with command: 'swarm cleandb'")
log.Warn("Invalid Chunk in Database. Please repair with command: 'swarm cleandb'")
}
chunk = &Chunk{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册