mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 09:53:48 +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
|
package storage
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
|
||||||
"fmt"
|
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
lru "github.com/hashicorp/golang-lru"
|
lru "github.com/hashicorp/golang-lru"
|
||||||
|
|
@ -79,11 +77,7 @@ func (m *MemStore) Get(key Key) (*Chunk, error) {
|
||||||
if !ok {
|
if !ok {
|
||||||
return nil, ErrChunkNotFound
|
return nil, ErrChunkNotFound
|
||||||
}
|
}
|
||||||
chunk := c.(*Chunk)
|
return c.(*Chunk), nil
|
||||||
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
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *MemStore) Put(c *Chunk) {
|
func (m *MemStore) Put(c *Chunk) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue