#include "core/or/origin_circuit_st.h"
#include "core/or/socks_request_st.h"
+#define TOR_CONGESTION_CONTROL_PRIVATE
+#include "core/or/congestion_control_common.h"
+
static int
mock_connection_ap_handshake_send_begin(entry_connection_t *ap_conn)
{
(void) arg;
hs_init();
+ congestion_control_set_cc_enabled();
MOCK(networkstatus_get_reasonably_live_consensus,
mock_networkstatus_get_reasonably_live_consensus);
#include "test/log_test_helpers.h"
#include "test/rng_test_helpers.h"
+#define TOR_CONGESTION_CONTROL_PRIVATE
+#include "core/or/congestion_control_common.h"
+
#ifdef HAVE_CFLAG_WOVERLENGTH_STRINGS
DISABLE_GCC_WARNING("-Woverlength-strings")
/* We allow huge string constants in the unit tests, but not in the code
(void) arg;
+ congestion_control_set_cc_enabled();
+
ret = ed25519_keypair_generate(&signing_kp, 0);
tt_int_op(ret, OP_EQ, 0);
desc = hs_helper_build_hs_desc_with_ip(&signing_kp);
#define PROTOVER_PADDING_V1 1
#define PROTOVER_FLOWCTRL_V1 1
-#define PROTOVER_FLOWCTRL_V2 2
#define PROTOVER_RELAY_NTOR_V3 4
/* Now check version exceptions */
- /* Congestion control. */
- memset(&flags, 0, sizeof(flags));
- summarize_protover_flags(&flags,
- PROTOVER("FlowCtrl", PROTOVER_FLOWCTRL_V2),
- NULL);
- summarize_protover_flags(&flags,
- PROTOVER("Relay", PROTOVER_RELAY_NTOR_V3),
- NULL);
- DEBUG_PROTOVER(flags);
- tt_int_op(flags.protocols_known, OP_EQ, 1);
- tt_int_op(flags.supports_congestion_control, OP_EQ, 1);
- /* Now clear those flags, and check the rest are zero */
- flags.protocols_known = 0;
- flags.supports_congestion_control = 0;
- tt_mem_op(&flags, OP_EQ, &zero_flags, sizeof(flags));
-
/* EXTEND2 cell support */
memset(&flags, 0, sizeof(flags));
summarize_protover_flags(&flags, NULL, "Tor 0.2.4.8-alpha");