Skip to content

Commit 692a040

Browse files
committed
Fix displaying number of forks
- fixed the number of forks shown (need DISPLAY_FORKS+1 iteration, because first loop run is active fork) - fixed recentForks count (use correct block time and don't count active fork)
1 parent 6fd2ef9 commit 692a040

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Content.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ function createForksContent(){
147147
$lastTime = 0;
148148

149149
foreach($forks as $fork){
150-
if($i == Config::DISPLAY_FORKS){
150+
if($i > Config::DISPLAY_FORKS){
151151
break;
152152
}
153153

@@ -168,7 +168,7 @@ function createForksContent(){
168168
$content["blocks"][$i]["timeago"] = round((time() - $block["time"])/ (($i === 0) ? 60 : 86400));
169169
$content["blocks"][$i]["txcount"] = count($block["tx"]);
170170

171-
if($content["blocks"][$i]["time"] >= $timeAgo){
171+
if($block["time"] >= $timeAgo && $fork["status"] != "active"){
172172
$content["recentForks"]++;
173173
}
174174
}

0 commit comments

Comments
 (0)