Skip to content

Commit

Permalink
fix: bad formatting from GH code review (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
rvagg authored Nov 28, 2022
1 parent 1da8a82 commit 861e2ce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions blocks/randompruner.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,9 @@ func (pruner *RandomPruner) prune(ctx context.Context, bytesToPrune uint64) erro
func (pruner *RandomPruner) updatePin(pin cid.Cid) {
// clone the Cid to ensure we don't hang on to memory that may come from the network stack
// where the Cid was decoded as part of a larger message
emptyPinClone := make([]byte, 0, len(pin.Bytes()))
pinClone := append(emptyPinClone, pin.Bytes()...)
pin = cid.MustParse(pinClone)
emptyPinClone := make([]byte, 0, len(pin.Bytes()))
pinClone := append(emptyPinClone, pin.Bytes()...)
pin = cid.MustParse(pinClone)
pruner.pinsLk.Lock()
pruner.pins[pin] = time.Now()
pruner.pinsLk.Unlock()
Expand Down

0 comments on commit 861e2ce

Please sign in to comment.