Skip to content

Commit

Permalink
refactor: remove shouldDecrReserveSize
Browse files Browse the repository at this point in the history
  • Loading branch information
nugaon committed Oct 31, 2024
1 parent c9098fd commit 4b27d65
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/storer/internal/reserve/reserve.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func (r *Reserve) Put(ctx context.Context, chunk swarm.Chunk) error {
r.multx.Lock(strconv.Itoa(int(bin)))
defer r.multx.Unlock(strconv.Itoa(int(bin)))

var shouldIncReserveSize, shouldDecrReserveSize bool
var shouldIncReserveSize bool

err = r.st.Run(ctx, func(s transaction.Store) error {

Expand Down Expand Up @@ -290,9 +290,6 @@ func (r *Reserve) Put(ctx context.Context, chunk swarm.Chunk) error {
if shouldIncReserveSize {
r.size.Add(1)
}
if shouldDecrReserveSize {
r.size.Add(-1)
}
return nil
}

Expand Down

0 comments on commit 4b27d65

Please sign in to comment.