mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
swarm/storage: do not return nil context
This commit is contained in:
parent
cd83b4ecc3
commit
e9b43afe6b
2 changed files with 3 additions and 3 deletions
|
|
@ -794,11 +794,11 @@ func (s *LDBStore) Put(ctx context.Context, chunk Chunk) error {
|
|||
batch := s.batch
|
||||
|
||||
log.Trace("ldbstore.put: s.db.Get", "key", chunk.Address(), "ikey", fmt.Sprintf("%x", ikey))
|
||||
idata, err := s.db.Get(ikey)
|
||||
_, err := s.db.Get(ikey)
|
||||
if err != nil {
|
||||
s.doPut(chunk, &index, po)
|
||||
}
|
||||
idata = encodeIndex(&index)
|
||||
idata := encodeIndex(&index)
|
||||
s.batch.Put(ikey, idata)
|
||||
|
||||
// add the access-chunkindex index for garbage collection
|
||||
|
|
|
|||
|
|
@ -445,7 +445,7 @@ func TestLDBStoreAddRemove(t *testing.T) {
|
|||
log.Info("ldbstore", "entrycnt", ldb.entryCnt, "accesscnt", ldb.accessCnt)
|
||||
|
||||
for i := 0; i < n; i++ {
|
||||
ret, err := ldb.Get(nil, chunks[i].Address())
|
||||
ret, err := ldb.Get(context.TODO(), chunks[i].Address())
|
||||
|
||||
if i%2 == 0 {
|
||||
// expect even chunks to be missing
|
||||
|
|
|
|||
Loading…
Reference in a new issue