From: Brian Warner Date: Fri, 1 Dec 2006 02:20:17 +0000 (-0700) Subject: set Client.nodeid to our (ascii, base32) tubid X-Git-Tag: tahoe_v0.1.0-0-UNSTABLE~526 X-Git-Url: https://git.rkrishnan.org/pb.xhtml?a=commitdiff_plain;h=0873f39de6517a3583f47946fbca2baa7c399500;p=tahoe-lafs%2Ftahoe-lafs.git set Client.nodeid to our (ascii, base32) tubid --- diff --git a/allmydata/client.py b/allmydata/client.py index f52afb73..78f7381b 100644 --- a/allmydata/client.py +++ b/allmydata/client.py @@ -27,6 +27,7 @@ class Client(service.MultiService, Referenceable): f = open(self.CERTFILE, "wb") f.write(self.tub.getCertData()) f.close() + self.nodeid = self.tub.tubID self.tub.setServiceParent(self) self.queen = None # self.queen is either None or a RemoteReference self.all_peers = set() @@ -68,7 +69,7 @@ class Client(service.MultiService, Referenceable): self.queen = queen queen.notifyOnDisconnect(self._lost_queen) queen.callRemote("hello", - nodeid=self.tub.tubID, node=self, pburl=self.my_pburl) + nodeid=self.nodeid, node=self, pburl=self.my_pburl) def _lost_queen(self): log.msg("lost connection to queen") @@ -79,7 +80,7 @@ class Client(service.MultiService, Referenceable): def remote_add_peers(self, new_peers): for nodeid, pburl in new_peers: - if nodeid == self.tub.tubID: + if nodeid == self.nodeid: continue log.msg("adding peer %s" % nodeid) if nodeid in self.all_peers: