mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-18 18:56:28 +00:00
client.py: internal renaming, _server_key -> _node_key
This commit is contained in:
parent
f23ecb4af0
commit
bda0e971f0
@ -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")
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user