<p><a href="https://bitcoin.stackexchange.com/users/129640/stickies-v">stickies-v</a> pointed out in a comment that the code calculating the progress increase per hour is in <a href="https://github.com/bitcoin/bitcoin/blob/ce3b75690d10426e97d087ca600140a19bf180b7/src/qt/modaloverlay.cpp#L90-L117" rel="nofollow noreferrer"><code>ModalOverlay::tipUpdate()</code></a>.</p>
<p>Basically, it does as would be expected to find the percent change of a quantity:</p>
<ol>
<li><p>Milliseconds elapsed between first and sample blocks:<br>
<strong>Δt = t_FirstBlock - t_SampleBlock</strong></p>
</li>
<li><p>How many milliseconds faster the sample block processed than the first block:<br>
<strong>Δprogress = t_FirstBlockProcess - t_SampleBlockProcess</strong></p>
</li>
<li><p>Gives:<br>
<strong>(% progress per hour) = Δprogress / (Δt × 1000 × 3600)</strong>,</p>
</li>
</ol>
<p>where (1000 × 3600) = milliseconds in 1 hour.</p>
<p><sup>Actually, Δt and Δprogress are both negative numbers, but their ratio in step 3 above is positive.</sup></p>

CC BY-SA 4.0
2024-06-06T23:34:21.940Z
2024-08-22T15:14:21.890Z
2024-08-22T15:14:21.890Z
Geremia
<p>How is “progress per hour” calculated?</p>
<p><a href="https://i.sstatic.net/jVwdc.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/jVwdc.jpg" alt="progress per hour" /></a></p>
<p>What would be the shell script code to return this result?</p>

<bitcoin-core><synchronization>
How is “progress per hour” calculated?
Ricardo Reis
# How is “progress per hour” calculated?

(Asked by: username_0 on 2022-07-30)

How is “progress per hour” calculated?

[![progress per hour](https://i.sstatic.net/jVwdc.jpg)](https://i.sstatic.net/jVwdc.jpg)

What would be the shell script code to return this result?

**Tags:** bitcoin-core, synchronization


---

## 1 answers

### Answer by username_1 on 2024-06-06. Score: 1

[stickies-v](https://bitcoin.stackexchange.com/users/129640/stickies-v) pointed out in a comment that the code calculating the progress increase per hour is in [`ModalOverlay::tipUpdate()`](https://github.com/bitcoin/bitcoin/blob/ce3b75690d10426e97d087ca600140a19bf180b7/src/qt/modaloverlay.cpp#L90-L117).

Basically, it does as would be expected to find the percent change of a quantity:

1. Milliseconds elapsed between first and sample blocks:  
   **Δt = t\_FirstBlock - t\_SampleBlock**
2. How many milliseconds faster the sample block processed than the first block:  
   **Δprogress = t\_FirstBlockProcess - t\_SampleBlockProcess**
3. Gives:  
   **(% progress per hour) = Δprogress / (Δt × 1000 × 3600)**,

where (1000 × 3600) = milliseconds in 1 hour.

Actually, Δt and Δprogress are both negative numbers, but their ratio in step 3 above is positive.


---

