From 3feca6d743f4012b5dc162f5338a658b3497452e Mon Sep 17 00:00:00 2001 From: Ian Macdonald Date: Thu, 30 Jun 2022 10:41:34 +0200 Subject: [PATCH] Sort active nodes by last uptime proof. Since HF19, there is no longer a concept of a per node reward height, so we need a new sort criterion for active nodes. I believe the most interesting sort is that by most recent uptime proof. At the top of the list will appear nodes whose proof is overdue (i.e. > 1:00:00 ago). This should never be more than a few seconds, so one can see at a glance any nodes that are ripe for being moved to the Inactive/Decommissioned Service Nodes section the next time they are tested by the network. This also makes the list much more dynamic to watch. Since the Last Reward Height column is now redundant, we can replace it with something more interesting, such as the Active Since Height. --- templates/include/sn_active.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/include/sn_active.html b/templates/include/sn_active.html index 6300c41..a8bf80a 100644 --- a/templates/include/sn_active.html +++ b/templates/include/sn_active.html @@ -5,19 +5,19 @@ Contri­butors Operator Fee (%) Staking Requirement - Last Reward Height + Active Since Height Last Uptime Proof Expiry Date UTC (Estimated) - {%for sn in (active_sns | sort(attribute='last_reward_block_height,last_reward_transaction_index,service_node_pubkey'))[:limit_active]%} + {%for sn in (active_sns | sort(attribute='last_uptime_proof,service_node_pubkey'))[:limit_active]%} {%include 'include/sn_kcf.html'%} {{sn.staking_requirement | oxen(tag=false, fixed=true)}} - {{sn.last_reward_block_height}} + {{sn.state_height}} {{sn.last_uptime_proof | from_timestamp | ago if sn.last_uptime_proof > 0 else "Not Received"}} {%if sn.requested_unlock_height%}