[tor-commits] [onionoo/master] Include hibernation information in details documents.

karsten at torproject.org karsten at torproject.org
Tue Jan 28 09:13:20 UTC 2014


commit 295f1486bf38861e36757fbca57c4e1ef66b97bb
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date:   Tue Jan 28 10:02:59 2014 +0100

    Include hibernation information in details documents.
    
    Implements #10707.
---
 src/org/torproject/onionoo/NodeDataWriter.java |    3 +++
 web/index.html                                 |   16 ++++++++++++++++
 2 files changed, 19 insertions(+)

diff --git a/src/org/torproject/onionoo/NodeDataWriter.java b/src/org/torproject/onionoo/NodeDataWriter.java
index 7623e16..34692e8 100644
--- a/src/org/torproject/onionoo/NodeDataWriter.java
+++ b/src/org/torproject/onionoo/NodeDataWriter.java
@@ -380,6 +380,9 @@ public class NodeDataWriter implements DataWriter, DescriptorListener {
       }
       sb.append("]}");
     }
+    if (descriptor.isHibernating()) {
+      sb.append(",\n\"hibernating\":True");
+    }
     detailsStatus = new DetailsStatus();
     detailsStatus.documentString = sb.toString();
     this.documentStore.store(detailsStatus, fingerprint);
diff --git a/web/index.html b/web/index.html
index d270c60..2720a5b 100644
--- a/web/index.html
+++ b/web/index.html
@@ -713,6 +713,22 @@ running in the last relay network status consensus.
 </li>
 
 <li>
+<font color="blue"><b>hibernating</b></font>
+<code class="typeof">boolean</code>
+<span class="required-false">optional</span>
+<p>
+Boolean field saying whether this relay indicated that it is hibernating
+in its last known server descriptor.
+This information may be helpful to decide whether a relay that is not
+running anymore has reached its accounting limit rather and has not
+dropped out of the network for another, unknown reason.
+Omitted if either the relay is not hibernating, or if no information is
+available about the hiberation status of the relay.
+<font color="blue">Added on January 28, 2014.</font>
+</p>
+</li>
+
+<li>
 <b>flags</b>
 <code class="typeof">array of strings</code>
 <span class="required-false">optional</span>



More information about the tor-commits mailing list