Preserve channel identity in member adapter fixtures

This commit is contained in:
evgeny committed 2026-10-06 14:04:49 +02:00
1 parent 2bcba58131
commit 5c772aeecf
3 files changed
+7

No files matched your search

+3
View File
@@ -29,6 +29,9 @@ static void test_owner_sizes(struct UASYNC* ua) {
struct UTUN_INSTANCE source, target; setup(&source, ua); setup(&target, ua);
uint8_t x[32] = {9}, priv[32] = {7}, pub[32], owner_priv[32] = {8}, owner_pub[32], zero[64] = {0};
public_key(priv, pub); public_key(owner_priv, owner_pub);
/* setup создаёт пустой канал с тестовым ключом; новую идентичность создаём как новый канал. */
assert(topo_node_sqlite_channel_delete(source.topo_sqlite_db, "1001") == 0);
assert(topo_node_sqlite_channel_delete(target.topo_sqlite_db, "1001") == 0);
assert(topo_node_sqlite_channel_put(source.topo_sqlite_db, "1001", "test", 1, x, NULL, owner_pub, owner_priv, zero) == 0);
assert(topo_node_sqlite_channel_put(target.topo_sqlite_db, "1001", "test", 1, x, NULL, owner_pub, NULL, zero) == 0);
uint64_t nid = sc_derive_node_id_from_pubkey(x);