Skip to content

Commit

Permalink
refactor: .
Browse files Browse the repository at this point in the history
  • Loading branch information
acha-bill committed Feb 19, 2024
1 parent 35e6650 commit e3b172e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/storer/reserve.go
Original file line number Diff line number Diff line change
Expand Up @@ -476,10 +476,8 @@ func (db *DB) ReserveSize() int {

func (db *DB) ReserveSizeWithinRadius(radius uint8) (uint64, error) {
var count uint64
err := db.reserve.IterateChunksItems(db.repo, 0, func(ci reserve.ChunkItem) (bool, error) {
if ci.Bin >= radius {
count++
}
err := db.reserve.IterateChunksItems(db.repo, radius, func(_ reserve.ChunkItem) (bool, error) {
count++
return false, nil
})
if err != nil {
Expand Down

0 comments on commit e3b172e

Please sign in to comment.