Skip to content

Commit 4704107

Browse files
committed
Show average time between txs with more precision
1 parent 68bad39 commit 4704107

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

otsserver/rpc.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,8 @@ def do_GET(self):
186186
transactions_in_last_week = list(filter(lambda x: x["time"] > a_week_ago_posix, transactions))
187187
fees_in_last_week = reduce(lambda a,b: a-b["fee"], transactions_in_last_week, 0)
188188
try:
189-
time_between_transactions = str(round(168 / len(transactions_in_last_week))) # in hours based on 168 hours in a week
190-
time_between_transactions += " hour(s)"
189+
time_between_transactions = str(round(168 / len(transactions_in_last_week), 2)) # in hours based on 168 hours in a week
190+
time_between_transactions += " hours"
191191
except ZeroDivisionError:
192192
time_between_transactions = "N/A"
193193
transactions.sort(key=lambda x: x["confirmations"])

0 commit comments

Comments
 (0)