+ assert(meshlink_get_node(mesh[0], "quux"));
+ assert(!meshlink_get_node_blacklisted(mesh[0], meshlink_get_node(mesh[0], "quux")));
+ assert(meshlink_get_node_blacklisted(mesh[0], meshlink_get_node(mesh[0], "xyzzy")));
+
+ meshlink_node_t **nodes = NULL;
+ size_t nnodes = 0;
+ nodes = meshlink_get_all_nodes_by_blacklisted(mesh[0], true, nodes, &nnodes);
+ assert(nnodes == 1);
+ assert(!strcmp(nodes[0]->name, "xyzzy"));
+
+ nodes = meshlink_get_all_nodes_by_blacklisted(mesh[0], false, nodes, &nnodes);
+ assert(nnodes == 4);
+ assert(!strcmp(nodes[0]->name, "bar"));
+ assert(!strcmp(nodes[1]->name, "baz"));
+ assert(!strcmp(nodes[2]->name, "foo"));
+ assert(!strcmp(nodes[3]->name, "quux"));
+
+ free(nodes);
+
+ // Check that blacklisted nodes are not allowed to be invited, and no invitations are left on disk.
+
+ assert(!meshlink_invite(mesh[0], NULL, "xyzzy"));
+
+ DIR *dir = opendir("blacklist_conf.0/current/invitations");
+ assert(dir);
+ struct dirent *ent;
+
+ while((ent = readdir(dir))) {
+ assert(!strcmp(ent->d_name, ".") || !strcmp(ent->d_name, ".."));
+ }
+
+ closedir(dir);