Spaces:
Runtime error
Runtime error
alex n
commited on
Commit
·
6b92fa1
1
Parent(s):
604a5b9
fixed error with last bits not being displayed
Browse files
app.py
CHANGED
@@ -140,12 +140,12 @@ def get_validator_data() -> pd.DataFrame:
|
|
140 |
|
141 |
bits_response = requests.get(
|
142 |
f"{axon_endpoint}/bits",
|
143 |
-
headers={"range": "bytes
|
144 |
timeout=5
|
145 |
)
|
146 |
bits_response.raise_for_status()
|
147 |
binary_string = ''.join(format(byte, '08b') for byte in bits_response.content)
|
148 |
-
validator_info['Recent Bits'] = binary_string
|
149 |
validator_info['API'] = '<span class="api-status api-up">✅</span>' if bits_response.ok else '<span class="api-status api-down">❌</span>'
|
150 |
|
151 |
except requests.Timeout:
|
|
|
140 |
|
141 |
bits_response = requests.get(
|
142 |
f"{axon_endpoint}/bits",
|
143 |
+
headers={"range": "bytes=-1"},
|
144 |
timeout=5
|
145 |
)
|
146 |
bits_response.raise_for_status()
|
147 |
binary_string = ''.join(format(byte, '08b') for byte in bits_response.content)
|
148 |
+
validator_info['Recent Bits'] = binary_string[-8:]
|
149 |
validator_info['API'] = '<span class="api-status api-up">✅</span>' if bits_response.ok else '<span class="api-status api-down">❌</span>'
|
150 |
|
151 |
except requests.Timeout:
|