mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-25 07:07:52 +01:00
squash! Implement Path use bias accounting.
Make a debug log more informative.
This commit is contained in:
parent
f858370233
commit
06a1d0b044
1 changed files with 10 additions and 6 deletions
|
@ -1582,9 +1582,11 @@ pathbias_count_use_attempt(origin_circuit_t *circ)
|
||||||
pathbias_check_use_rate(guard);
|
pathbias_check_use_rate(guard);
|
||||||
guard->use_attempts++;
|
guard->use_attempts++;
|
||||||
|
|
||||||
log_debug(LD_CIRC, "Marked circuit %d as used for guard %s=%s.",
|
log_debug(LD_CIRC,
|
||||||
circ->global_identifier, guard->nickname,
|
"Marked circuit %d (%f/%f) as used for guard %s=%s.",
|
||||||
hex_str(guard->identity, DIGEST_LEN));
|
circ->global_identifier,
|
||||||
|
guard->use_successes, guard->use_attempts,
|
||||||
|
guard->nickname, hex_str(guard->identity, DIGEST_LEN));
|
||||||
}
|
}
|
||||||
|
|
||||||
circ->path_state = PATH_STATE_USE_ATTEMPTED;
|
circ->path_state = PATH_STATE_USE_ATTEMPTED;
|
||||||
|
@ -1664,9 +1666,11 @@ pathbias_count_use_success(origin_circuit_t *circ)
|
||||||
guard->use_successes++;
|
guard->use_successes++;
|
||||||
|
|
||||||
log_debug(LD_CIRC,
|
log_debug(LD_CIRC,
|
||||||
"Marked circuit %d as used successfully for guard %s=%s.",
|
"Marked circuit %d (%f/%f) as used successfully for guard "
|
||||||
circ->global_identifier, guard->nickname,
|
"%s=%s.",
|
||||||
hex_str(guard->identity, DIGEST_LEN));
|
circ->global_identifier, guard->use_successes,
|
||||||
|
guard->use_attempts, guard->nickname,
|
||||||
|
hex_str(guard->identity, DIGEST_LEN));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue