fairness: limity podle reálného provozu, 00/ff odesílatelé nejsou rezervovaní
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f14517029c
commit
02cda9f9e3
3 files changed
+33
-36
No files matched your search
@@ -35,11 +35,6 @@ void FairnessLimiter::refillGroup() {
|
||||
}
|
||||
|
||||
uint8_t FairnessLimiter::peekSenderNormal(const uint8_t* hash) {
|
||||
// Always zero as 0x00 and 0xFF are reserved
|
||||
if (hash[0] == 0x00 || hash[0] == 0xFF) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
auto i = sender_normal_idx(hash);
|
||||
if (i >= SENDER_NORMAL_MAP_SIZE) {
|
||||
return 0;
|
||||
@@ -48,11 +43,6 @@ uint8_t FairnessLimiter::peekSenderNormal(const uint8_t* hash) {
|
||||
}
|
||||
|
||||
bool FairnessLimiter::takeSenderNormal(const uint8_t* hash) {
|
||||
// Always false as 0x00 and 0xFF are reserved
|
||||
if (hash[0] == 0x00 || hash[0] == 0xFF) {
|
||||
return false;
|
||||
}
|
||||
|
||||
auto i = sender_normal_idx(hash);
|
||||
bool allow = false;
|
||||
if (i < SENDER_NORMAL_MAP_SIZE && sender_normal_map[i] > 0) {
|
||||
@@ -75,11 +65,6 @@ void FairnessLimiter::refillSenderNormal() {
|
||||
}
|
||||
|
||||
uint8_t FairnessLimiter::peekSenderLow(const uint8_t* hash) {
|
||||
// Always zero as 0x00 and 0xFF are reserved
|
||||
if (hash[0] == 0x00 || hash[0] == 0xFF) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
auto i = sender_low_idx(hash);
|
||||
if (i >= SENDER_LOW_MAP_SIZE) {
|
||||
return 0;
|
||||
@@ -88,11 +73,6 @@ uint8_t FairnessLimiter::peekSenderLow(const uint8_t* hash) {
|
||||
}
|
||||
|
||||
bool FairnessLimiter::takeSenderLow(const uint8_t* hash) {
|
||||
// Always false as 0x00 and 0xFF are reserved
|
||||
if (hash[0] == 0x00 || hash[0] == 0xFF) {
|
||||
return false;
|
||||
}
|
||||
|
||||
auto i = sender_low_idx(hash);
|
||||
bool allow = false;
|
||||
if (i < SENDER_LOW_MAP_SIZE && sender_low_map[i] > 0) {
|
||||
|
||||
Reference in new issue
Block a user