Browse Source

rings: fix NodeZeroMax/NodeMax to not accept .255

Signed-off-by: Alejandro Mery <amery@jpi.io>
pull/50/head
Alejandro Mery 7 months ago
parent
commit
6d89e0ea3c
  1. 4
      pkg/rings/rings.go

4
pkg/rings/rings.go

@ -16,10 +16,10 @@ const (
// ZoneMax indicates the highest number that can be used for a [ZoneID]. // ZoneMax indicates the highest number that can be used for a [ZoneID].
ZoneMax = (1 << 4) - 1 ZoneMax = (1 << 4) - 1
// NodeMax indicates the highest number that can be used for a [NodeID]. // NodeMax indicates the highest number that can be used for a [NodeID].
NodeMax = (1 << 12) - 1 NodeMax = (1 << 12) - 2
// NodeZeroMax indicates the highest number that can be used for a [NodeID] // NodeZeroMax indicates the highest number that can be used for a [NodeID]
// when its a gateway connected to Ring 0 (backbone). // when its a gateway connected to Ring 0 (backbone).
NodeZeroMax = (1 << 8) - 1 NodeZeroMax = (1 << 8) - 2
// RingZeroBits indicates the size of the prefix on the ring 0 (backbone) network. // RingZeroBits indicates the size of the prefix on the ring 0 (backbone) network.
RingZeroBits = 16 RingZeroBits = 16

Loading…
Cancel
Save