Profiles: Do not exclude L profiles if we are non-ff, low-bw

to hopefully prevent netdb peer loss
This commit is contained in:
zzz committed 2026-07-03 10:42:24 -04:00
1 parent b24aae44c7
commit 37cf32fd49
1 file changed
+3 -2
@@ -433,10 +433,11 @@ public class ProfileManagerImpl implements ProfileManager {
* @param caps non-null from the peer's RI, used to determine if the profile will be created if it doesn't exist
* @since 0.9.70
*/
private static boolean shouldCreate(String caps) {
private boolean shouldCreate(String caps) {
return caps.indexOf('R') >= 0 &&
(caps.indexOf('f') >= 0 ||
(caps.indexOf('L') < 0 &&
// Exclude L if we are FF or high BW (OPX)
((caps.indexOf('L') < 0 || (!_context.netDb().floodfillEnabled() && _context.bandwidthLimiter().getMaxShareBandwidth() < 128*1024)) &&
// possibly M and N also but there aren't that many of them
caps.indexOf('E') < 0 &&
caps.indexOf('G') < 0));