refactoring + beginning of file transfer

Now attempting to use kademlia to find a hash, and NodeIO to transfer
the file
This commit is contained in:
John Jones 2017-03-19 07:47:19 -05:00
parent 93c4988f90
commit e8b8d06f24
20 changed files with 357 additions and 90 deletions

View file

@ -38,14 +38,14 @@ int test_repo_config_init() {
if (retVal != 0)
return 0;
if (repoConfig->addresses->swarm->num_addresses != 2)
if (repoConfig->addresses->swarm_head == NULL || repoConfig->addresses->swarm_head->next == NULL || repoConfig->addresses->swarm_head->next->next != NULL)
return 0;
retVal = strncmp(repoConfig->addresses->swarm->addresses[0], "/ip4/0.0.0.0/tcp/4001", 21);
retVal = strcmp((char*)repoConfig->addresses->swarm_head->item, "/ip4/0.0.0.0/tcp/4001");
if (retVal != 0)
return 0;
retVal = strncmp(repoConfig->addresses->swarm->addresses[1], "/ip6/::/tcp/4001", 16);
retVal = strcmp((char*)repoConfig->addresses->swarm_head->next->item, "/ip6/::/tcp/4001");
if (retVal != 0)
return 0;