From: Brian Warner Date: Sun, 14 Apr 2013 20:22:10 +0000 (-0700) Subject: client.py: internal renaming, _server_key -> _node_key X-Git-Tag: allmydata-tahoe-1.10b1~8 X-Git-Url: https://git.rkrishnan.org/pf/content/en/footer/legal.html?a=commitdiff_plain;h=bda0e971f0a004bf7b1e5ed2890af5f22d2baaa3;p=tahoe-lafs%2Ftahoe-lafs.git client.py: internal renaming, _server_key -> _node_key --- diff --git a/src/allmydata/client.py b/src/allmydata/client.py index 23ca8b3d..a1e99d9d 100644 --- a/src/allmydata/client.py +++ b/src/allmydata/client.py @@ -223,7 +223,7 @@ class Client(node.Node, pollmixin.PollMixin): sk_vs = self.get_or_create_private_config("node.privkey", _make_key) sk,vk_vs = keyutil.parse_privkey(sk_vs.strip()) self.write_config("node.pubkey", vk_vs+"\n") - self._server_key = sk + self._node_key = sk def _init_permutation_seed(self, ss): seed = self.get_config_from_file("permutation-seed") @@ -241,7 +241,7 @@ class Client(node.Node, pollmixin.PollMixin): else: # otherwise, we're free to use the more natural seed of our # pubkey-based serverid - vk_bytes = self._server_key.get_verifying_key_bytes() + vk_bytes = self._node_key.get_verifying_key_bytes() seed = base32.b2a(vk_bytes) self.write_config("permutation-seed", seed+"\n") return seed.strip() @@ -310,7 +310,7 @@ class Client(node.Node, pollmixin.PollMixin): ann = {"anonymous-storage-FURL": furl, "permutation-seed-base32": self._init_permutation_seed(ss), } - self.introducer_client.publish("storage", ann, self._server_key) + self.introducer_client.publish("storage", ann, self._node_key) d.addCallback(_publish) d.addErrback(log.err, facility="tahoe.init", level=log.BAD, umid="aLGBKw") diff --git a/src/allmydata/test/test_introducer.py b/src/allmydata/test/test_introducer.py index 15ddfe49..21adb814 100644 --- a/src/allmydata/test/test_introducer.py +++ b/src/allmydata/test/test_introducer.py @@ -1014,7 +1014,7 @@ class ClientSeqnums(unittest.TestCase): f.close() return int(seqnum) - ic.publish("sA", {"key": "value1"}, c._server_key) + ic.publish("sA", {"key": "value1"}, c._node_key) self.failUnlessEqual(read_seqnum(), 1) self.failUnless("sA" in outbound) self.failUnlessEqual(outbound["sA"]["seqnum"], 1) @@ -1026,7 +1026,7 @@ class ClientSeqnums(unittest.TestCase): # publishing a second service causes both services to be # re-published, with the next higher sequence number - ic.publish("sB", {"key": "value2"}, c._server_key) + ic.publish("sB", {"key": "value2"}, c._node_key) self.failUnlessEqual(read_seqnum(), 2) self.failUnless("sB" in outbound) self.failUnlessEqual(outbound["sB"]["seqnum"], 2)