Specify explicit admission policy in existing ETCP constructors
This commit is contained in:
1 parent
b849d6fb01
commit
924fad3e06
3 files changed
+3
-3
No files matched your search
@@ -158,7 +158,7 @@ static void create(void) {
|
||||
}
|
||||
for (int a = 0; a < N; a++) for (int b = 0; b < N; b++) {
|
||||
if (a == b) continue;
|
||||
struct ETCP_CONN* c = conns[a][b] = etcp_connection_create(nodes[a], "virtual_bgp"); assert(c);
|
||||
struct ETCP_CONN* c = conns[a][b] = etcp_connection_create(nodes[a], "virtual_bgp", 0); assert(c);
|
||||
c->peer_node_id = nodes[b]->node_id;
|
||||
assert(sc_init_ctx(&c->crypto_ctx, &nodes[a]->my_keys) == SC_OK);
|
||||
assert(sc_set_peer_public_key(&c->crypto_ctx, nodes[b]->my_keys.public_key, SC_PEER_PUBKEY_BIN) == SC_OK);
|
||||
|
||||
@@ -95,7 +95,7 @@ static void setup(struct fixture* f) {
|
||||
assert(channels == 2);
|
||||
for (unsigned i = 0; i < 3; i++) {
|
||||
struct SC_MYKEYS keys; assert(sc_generate_keypair(&keys) == SC_OK);
|
||||
struct ETCP_CONN* conn = etcp_connection_create(f->inst, "schedule peer"); assert(conn);
|
||||
struct ETCP_CONN* conn = etcp_connection_create(f->inst, "schedule peer", 0); assert(conn);
|
||||
conn->peer_node_id = sc_derive_node_id_from_pubkey(keys.public_key);
|
||||
conn->initialized = 1; conn->links_up = 1; conn->state = 1;
|
||||
assert(sc_init_ctx(&conn->crypto_ctx, &f->inst->my_keys) == SC_OK);
|
||||
|
||||
@@ -90,7 +90,7 @@ static struct ETCP_LINK* first_link(unsigned side) {
|
||||
static void run_for(unsigned tb) { test_clock_run_for(ua, tb); }
|
||||
|
||||
static void start_source(unsigned count) {
|
||||
ep[0].conn = etcp_connection_create(ep[0].inst, "liveness"); CHECK(ep[0].conn);
|
||||
ep[0].conn = etcp_connection_create(ep[0].inst, "liveness", 0); CHECK(ep[0].conn);
|
||||
ep[0].conn->peer_node_id = ep[1].inst->node_id;
|
||||
CHECK(sc_init_ctx(&ep[0].conn->crypto_ctx, &ep[0].inst->my_keys) == SC_OK);
|
||||
CHECK(sc_set_peer_public_key(&ep[0].conn->crypto_ctx, ep[1].inst->my_keys.public_key, SC_PEER_PUBKEY_BIN) == SC_OK);
|
||||
|
||||
Reference in new issue
Block a user