tor
master
|
Header file for shared_random_client.c. More...
#include "dirauth/shared_random.h"
Go to the source code of this file.
Macros | |
#define | SHARED_RANDOM_N_ROUNDS 12 |
#define | SHARED_RANDOM_N_PHASES 2 |
Functions | |
void | sr_srv_encode (char *dst, size_t dst_len, const sr_srv_t *srv) |
int | get_voting_interval (void) |
char * | sr_get_current_for_control (void) |
char * | sr_get_previous_for_control (void) |
const sr_srv_t * | sr_get_current (const networkstatus_t *ns) |
const sr_srv_t * | sr_get_previous (const networkstatus_t *ns) |
sr_srv_t * | sr_parse_srv (const smartlist_t *args) |
time_t | sr_state_get_start_time_of_current_protocol_run (time_t now) |
unsigned int | sr_state_get_phase_duration (void) |
unsigned int | sr_state_get_protocol_run_duration (void) |
time_t | get_start_time_of_current_round (void) |
Header file for shared_random_client.c.
unsigned int sr_state_get_phase_duration | ( | void | ) |
Return the time (in seconds) it takes to complete a full SR protocol phase (e.g. the commit phase).
unsigned int sr_state_get_protocol_run_duration | ( | void | ) |
Return the time (in seconds) it takes to complete a full SR protocol run
time_t sr_state_get_start_time_of_current_protocol_run | ( | time_t | now | ) |
Return the start time of the current SR protocol run. For example, if the time is 23/06/2017 23:47:08 and a full SR protocol run is 24 hours, this function should return 23/06/2017 00:00:00.