Skip to content

Commit ac831c1

Browse files
authored
refactor: max allowed doubling (#5016)
1 parent b840507 commit ac831c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/node/node.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ const (
190190
reserveWakeUpDuration = 15 * time.Minute // time to wait before waking up reserveWorker
191191
reserveMinEvictCount = 1_000
192192
cacheMinEvictCount = 10_000
193+
maxAllowedDoubling = 1
193194
)
194195

195196
func NewBee(
@@ -254,9 +255,8 @@ func NewBee(
254255
return nil, fmt.Errorf("reserve capacity doubling is only allowed for full nodes")
255256
}
256257

257-
const maxAllowedDoubling = 1
258258
if o.ReserveCapacityDoubling < 0 || o.ReserveCapacityDoubling > maxAllowedDoubling {
259-
return nil, fmt.Errorf("config reserve capacity doubling has to be between default: 0 and maximum: 1")
259+
return nil, fmt.Errorf("config reserve capacity doubling has to be between default: 0 and maximum: %d", maxAllowedDoubling)
260260
}
261261
var shallowReceiptTolerance = maxAllowedDoubling - o.ReserveCapacityDoubling
262262

0 commit comments

Comments
 (0)