summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/dir.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-09-19 16:48:54 +0000
committerSander Vrijders <sander.vrijders@ugent.be>2017-09-19 16:48:54 +0000
commitacd8235533d63a7e4dd4d1b5bdb17423d4b6fd75 (patch)
tree195bbf3a1aa1923394410db072f72c0b38aede8c /src/ipcpd/normal/dir.c
parentc0bbd7e2184f51038ecbaebfa3b21e5c52d35239 (diff)
parent1dcef3957393c0500b81d93ffacf573e78be9a51 (diff)
downloadouroboros-acd8235533d63a7e4dd4d1b5bdb17423d4b6fd75.tar.gz
ouroboros-acd8235533d63a7e4dd4d1b5bdb17423d4b6fd75.zip
Merged in dstaesse/ouroboros/be-dht-async (pull request #598)
ipcpd: Enroll DHT when creating dt connection
Diffstat (limited to 'src/ipcpd/normal/dir.c')
-rw-r--r--src/ipcpd/normal/dir.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/ipcpd/normal/dir.c b/src/ipcpd/normal/dir.c
index 6d04c66a..0d046cd6 100644
--- a/src/ipcpd/normal/dir.c
+++ b/src/ipcpd/normal/dir.c
@@ -39,8 +39,6 @@
#include <inttypes.h>
#define KAD_B (hash_len(ipcpi.dir_hash_algo) * CHAR_BIT)
-#define ENROL_RETR 6
-#define ENROL_INTV 1
struct dht * dht;
@@ -72,22 +70,6 @@ int dir_bootstrap(void) {
return 0;
}
-int dir_enroll(uint64_t addr) {
- size_t retr = 0;
- log_dbg("Enrolling directory with peer %" PRIu64 ".", addr);
- while (dht_enroll(dht, addr)) {
- if (retr++ == ENROL_RETR)
- return -EPERM;
-
- log_dbg("Directory enrollment failed, retrying...");
- sleep(ENROL_INTV);
- }
-
- log_info("Directory enrolled.");
-
- return 0;
-}
-
int dir_reg(const uint8_t * hash)
{
return dht_reg(dht, hash);