Skip to content

Commit

Permalink
disable penalties but leave default excludePeerCaps value
Browse files Browse the repository at this point in the history
  • Loading branch information
eyedeekay committed May 31, 2023
1 parent f33ac6c commit fcbe11e
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ class CapacityCalculator {
private static final double PENALTY_NO_R_CAP = 1;
private static final double PENALTY_U_CAP = 2;
private static final double PENALTY_LAST_SEND_FAIL = 4;
private static final double PENALTY_D_CAP = 1;
private static final double PENALTY_E_CAP = 2;
//private static final double PENALTY_G_CAP = 4;
// congestion cap penalty not yet applied
//private static final double PENALTY_D_CAP = 0;
// congestion cap penalty not yet applied
//private static final double PENALTY_E_CAP = 0;
//private static final double PENALTY_G_CAP = 0;
private static final double PENALTY_RECENT_SEND_FAIL = 4;
private static final double BONUS_LAST_SEND_SUCCESS = 1;
private static final double BONUS_RECENT_SEND_SUCCESS = 1;
Expand Down Expand Up @@ -128,10 +130,10 @@ public static double calc(PeerProfile profile) {
if (caps.indexOf(Router.CAPABILITY_BW32) >= 0)
capacity -= PENALTY_L_CAP;
/* TODO */
if (caps.indexOf(Router.CAPABILITY_CONGESTION_MODERATE) >= 0)
/*if (caps.indexOf(Router.CAPABILITY_CONGESTION_MODERATE) >= 0)
capacity -= PENALTY_D_CAP;
else if (caps.indexOf(Router.CAPABILITY_CONGESTION_SEVERE) >= 0)
capacity -= PENALTY_E_CAP;
capacity -= PENALTY_E_CAP;*/
/* TODO: G caps can be excluded in TunnelPeerSelector by adding it to DEFAULT_EXCLUDE_CAPS
decide what other handling if any is needed here.
else if (caps.indexOf(Router.CAPABILITY_NO_TUNNELS) >= 0)
Expand Down

0 comments on commit fcbe11e

Please sign in to comment.