- """encapsulate contact info"""
-
- def __init__(self):
- self.fails = 0
- self.lastSeen = time.time()
-
- def init(self, id, host, port):
- self.id = id
- self.int = hash.intify(id)
- self.host = host
- self.port = port
- self._senderDict = {'id': Binary(self.id), 'port' : self.port, 'host' : self.host}
- return self
+ """encapsulate contact info"""
+ def __init__(self):
+ self.fails = 0
+ self.lastSeen = 0
+ self.id = self.host = self.port = ''
+
+ def init(self, id, host, port):
+ self.id = id
+ self.num = hash.intify(id)
+ self.host = host
+ self.port = port
+ self._senderDict = {'id': self.id.encode('base64'), 'port' : self.port, 'host' : self.host}
+ return self