aboutsummaryrefslogtreecommitdiff
path: root/src/feature/control/control_events.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/feature/control/control_events.h')
-rw-r--r--src/feature/control/control_events.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/feature/control/control_events.h b/src/feature/control/control_events.h
index 74bbc0047d..4a5492b510 100644
--- a/src/feature/control/control_events.h
+++ b/src/feature/control/control_events.h
@@ -12,6 +12,7 @@
#ifndef TOR_CONTROL_EVENTS_H
#define TOR_CONTROL_EVENTS_H
+#include "lib/cc/ctassert.h"
#include "core/or/ocirc_event.h"
#include "core/or/orconn_event.h"
@@ -164,6 +165,7 @@ int control_event_buildtimeout_set(buildtimeout_set_event_t type,
int control_event_signal(uintptr_t signal);
void control_event_bootstrap(bootstrap_status_t status, int progress);
+int control_get_bootstrap_percent(void);
MOCK_DECL(void, control_event_bootstrap_prob_or,(const char *warn,
int reason,
or_connection_t *or_conn));
@@ -287,10 +289,7 @@ typedef uint64_t event_mask_t;
/* If EVENT_MAX_ ever hits 0x0040, we need to make the mask into a
* different structure, as it can only handle a maximum left shift of 1<<63. */
-
-#if EVENT_MAX_ >= EVENT_CAPACITY_
-#error control_connection_t.event_mask has an event greater than its capacity
-#endif
+CTASSERT(EVENT_MAX_ < EVENT_CAPACITY_);
#define EVENT_MASK_(e) (((uint64_t)1)<<(e))