mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 01:43:47 +00:00
swarm/storage: remove bytes check and panic
This commit is contained in:
parent
7c6b751209
commit
0eeda9fb35
1 changed files with 1 additions and 7 deletions
|
|
@ -19,8 +19,6 @@
|
|||
package storage
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"sync"
|
||||
|
||||
lru "github.com/hashicorp/golang-lru"
|
||||
|
|
@ -79,11 +77,7 @@ func (m *MemStore) Get(key Key) (*Chunk, error) {
|
|||
if !ok {
|
||||
return nil, ErrChunkNotFound
|
||||
}
|
||||
chunk := c.(*Chunk)
|
||||
if !bytes.Equal(chunk.Key, key) {
|
||||
panic(fmt.Errorf("MemStore.Get: chunk key %s != req key %s", chunk.Key.Hex(), key.Hex()))
|
||||
}
|
||||
return chunk, nil
|
||||
return c.(*Chunk), nil
|
||||
}
|
||||
|
||||
func (m *MemStore) Put(c *Chunk) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue