From e3b172e1cd684328ccbec7431fa106ddd116f37f Mon Sep 17 00:00:00 2001 From: Acha Bill Date: Mon, 19 Feb 2024 14:27:19 +0100 Subject: [PATCH] refactor: . --- pkg/storer/reserve.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkg/storer/reserve.go b/pkg/storer/reserve.go index b6bc8c84c41..e6b24da9b53 100644 --- a/pkg/storer/reserve.go +++ b/pkg/storer/reserve.go @@ -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 {