client.py: internal renaming, _server_key -> _node_key
authorBrian Warner <warner@lothar.com>
Sun, 14 Apr 2013 20:22:10 +0000 (13:22 -0700)
committerBrian Warner <warner@lothar.com>
Sun, 14 Apr 2013 20:22:10 +0000 (13:22 -0700)
src/allmydata/client.py
src/allmydata/test/test_introducer.py

index 23ca8b3d19f33248df2067f9d7deedb2444d924b..a1e99d9d4d371dcf380465f3f1d819dcad8b6160 100644 (file)
@@ -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")
index 15ddfe495990fccc35d28cee1ae3094737c78f3e..21adb814037bab21cd84f670ede6508fb19f1858 100644 (file)
@@ -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)