Skip to content

Commit 92c8a7f

Browse files
author
Alok Nerurkar
committed
fix: comments
1 parent e867557 commit 92c8a7f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

pkg/node/node.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1327,7 +1327,7 @@ func NewBee(
13271327
isReserveSynced := func(depth uint8) bool {
13281328
reserveThreshold := reserveCapacity * 5 / 10
13291329
logger.Debug("Sync status check evaluated", "stabilized", detector.IsStabilized())
1330-
return localStore.ReserveSize() >= reserveThreshold && pullerService.IsReserveSynced(depth) && detector.IsStabilized()
1330+
return localStore.ReserveSizeWithinRadius() >= uint64(reserveThreshold) && pullerService.IsReserveSynced(depth) && detector.IsStabilized()
13311331
}
13321332

13331333
agent, err = storageincentives.New(

pkg/puller/puller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ func (p *Puller) syncPeerBin(parentCtx context.Context, peer *syncPeer, bin uint
434434
}
435435
}
436436

437-
if cursor > 0 {
437+
if cursor > 0 && bin < swarm.MaxBins {
438438
p.activeHistSyncsMu.Lock()
439439
p.activeHistSyncs[bin]++
440440
p.activeHistSyncsMu.Unlock()

0 commit comments

Comments
 (0)