@@ -85,7 +85,7 @@ func NewLDBStoreParams(storeparams *StoreParams, path string) *LDBStoreParams {
8585 return & LDBStoreParams {
8686 StoreParams : storeparams ,
8787 Path : path ,
88- Po : func (k Address ) (ret uint8 ) { return uint8 (Proximity (storeparams .BaseKey [:] , k [:])) },
88+ Po : func (k Address ) (ret uint8 ) { return uint8 (Proximity (storeparams .BaseKey , k [:])) },
8989 }
9090}
9191
@@ -322,7 +322,7 @@ func (s *LDBStore) Export(out io.Writer) (int64, error) {
322322 log .Trace ("store.export" , "dkey" , fmt .Sprintf ("%x" , datakey ), "dataidx" , index .Idx , "po" , po )
323323 data , err := s .db .Get (datakey )
324324 if err != nil {
325- log .Warn (fmt .Sprintf ("Chunk %x found but could not be accessed: %v" , key [:] , err ))
325+ log .Warn (fmt .Sprintf ("Chunk %x found but could not be accessed: %v" , key , err ))
326326 continue
327327 }
328328
@@ -455,7 +455,7 @@ func (s *LDBStore) Cleanup() {
455455 }
456456
457457 if ! found {
458- log .Warn (fmt .Sprintf ("Chunk %x found but count not be accessed with any po" , key [:] ))
458+ log .Warn (fmt .Sprintf ("Chunk %x found but count not be accessed with any po" , key ))
459459 errorsFound ++
460460 continue
461461 }
@@ -469,10 +469,10 @@ func (s *LDBStore) Cleanup() {
469469 }
470470
471471 cs := int64 (binary .LittleEndian .Uint64 (c .sdata [:8 ]))
472- log .Trace ("chunk" , "key" , fmt .Sprintf ("%x" , key [:] ), "ck" , fmt .Sprintf ("%x" , ck ), "dkey" , fmt .Sprintf ("%x" , datakey ), "dataidx" , index .Idx , "po" , po , "len data" , len (data ), "len sdata" , len (c .sdata ), "size" , cs )
472+ log .Trace ("chunk" , "key" , fmt .Sprintf ("%x" , key ), "ck" , fmt .Sprintf ("%x" , ck ), "dkey" , fmt .Sprintf ("%x" , datakey ), "dataidx" , index .Idx , "po" , po , "len data" , len (data ), "len sdata" , len (c .sdata ), "size" , cs )
473473
474474 if len (c .sdata ) > ch .DefaultSize + 8 {
475- log .Warn ("chunk for cleanup" , "key" , fmt .Sprintf ("%x" , key [:] ), "ck" , fmt .Sprintf ("%x" , ck ), "dkey" , fmt .Sprintf ("%x" , datakey ), "dataidx" , index .Idx , "po" , po , "len data" , len (data ), "len sdata" , len (c .sdata ), "size" , cs )
475+ log .Warn ("chunk for cleanup" , "key" , fmt .Sprintf ("%x" , key ), "ck" , fmt .Sprintf ("%x" , ck ), "dkey" , fmt .Sprintf ("%x" , datakey ), "dataidx" , index .Idx , "po" , po , "len data" , len (data ), "len sdata" , len (c .sdata ), "size" , cs )
476476 s .delete (index .Idx , getIndexKey (key [1 :]), po )
477477 removed ++
478478 errorsFound ++
0 commit comments