limit differences to 5 bytes

This commit is contained in:
crn4
2025-11-13 17:19:24 +01:00
parent b0042c5cd0
commit c0698c8153

View File

@@ -5,6 +5,7 @@ import (
"encoding/json"
"errors"
"fmt"
"math"
"os"
"path/filepath"
"slices"
@@ -510,7 +511,7 @@ func (c *Controller) compareAndSaveNetworkMaps(ctx context.Context, accountId, p
return
}
if len(expBytes) == len(legacyBytes) {
if len(expBytes) == len(legacyBytes) || math.Abs(float64(len(expBytes)-len(legacyBytes))) > 5 {
log.WithContext(ctx).Debugf("network maps are equal for peer %s in account %s (size: %d bytes)", peerId, accountId, len(expBytes))
return
}