Handling finding of peer via swarm

Also included is a way to pass port and swarm info to methods that build
the config file. This makes testing easier. Multiple peers can be
started on the same machine easily.
This commit is contained in:
John Jones 2017-04-13 09:31:58 -05:00
parent 5d558f5229
commit 62096ffc1c
18 changed files with 210 additions and 42 deletions

View file

@ -61,7 +61,7 @@ int do_init(FILE* out_file, char* repo_root, int empty, int num_bits_for_keypair
return 0;
//TODO: If the conf is null, make one
if ( conf->identity->peer_id == NULL) {
int retVal = ipfs_repo_config_init(conf, num_bits_for_keypair, repo_root);
int retVal = ipfs_repo_config_init(conf, num_bits_for_keypair, repo_root, 4001, NULL);
if (retVal == 0)
return 0;
}