average over last 59 blocks
@@ -322,8 +322,8 @@ impl Server {
DiffStats {
height: tip_height as u64,
last_blocks: diff_entries,
- average_block_time: block_time_sum / consensus::DIFFICULTY_ADJUST_WINDOW,
- average_difficulty: block_diff_sum / consensus::DIFFICULTY_ADJUST_WINDOW,
+ average_block_time: block_time_sum / (consensus::DIFFICULTY_ADJUST_WINDOW - 1),
+ average_difficulty: block_diff_sum / (consensus::DIFFICULTY_ADJUST_WINDOW - 1),
window_size: consensus::DIFFICULTY_ADJUST_WINDOW,
}
};
