From 70f9f89c6647826722d24296157a2e3a891c71e0 Mon Sep 17 00:00:00 2001
From: Brian Warner <warner@lothar.com>
Date: Sat, 26 Feb 2011 19:12:03 -0700
Subject: [PATCH] control.py: remove all uses of s.get_serverid()

---
 src/allmydata/control.py    | 12 ++++++------
 src/allmydata/interfaces.py |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/allmydata/control.py b/src/allmydata/control.py
index 045a34e5..a081e19e 100644
--- a/src/allmydata/control.py
+++ b/src/allmydata/control.py
@@ -100,23 +100,23 @@ class ControlServer(Referenceable, service.Service):
         if not everyone_left:
             return results
         server = everyone_left.pop(0)
-        peerid = server.get_serverid()
+        server_name = server.longname()
         connection = server.get_rref()
         start = time.time()
         d = connection.callRemote("get_buckets", "\x00"*16)
         def _done(ignored):
             stop = time.time()
             elapsed = stop - start
-            if peerid in results:
-                results[peerid].append(elapsed)
+            if server_name in results:
+                results[server_name].append(elapsed)
             else:
-                results[peerid] = [elapsed]
+                results[server_name] = [elapsed]
         d.addCallback(_done)
         d.addCallback(self._do_one_ping, everyone_left, results)
         def _average(res):
             averaged = {}
-            for peerid,times in results.iteritems():
-                averaged[peerid] = sum(times) / len(times)
+            for server_name,times in results.iteritems():
+                averaged[server_name] = sum(times) / len(times)
             return averaged
         d.addCallback(_average)
         return d
diff --git a/src/allmydata/interfaces.py b/src/allmydata/interfaces.py
index 85c3e079..430981a9 100644
--- a/src/allmydata/interfaces.py
+++ b/src/allmydata/interfaces.py
@@ -2321,7 +2321,7 @@ class RIControlClient(RemoteInterface):
         @return: a dictionary mapping peerid to a float (RTT time in seconds)
         """
 
-        return DictOf(Nodeid, float)
+        return DictOf(str, float)
 
 UploadResults = Any() #DictOf(str, str)
 
-- 
2.45.2