user56108: Bitcoin Gold claimed to have per-block difficulty adjustment, how does it work? I find this https://github.com/BTCGPU/BTCGPU/pull/151, but still don't understand how it work by change some parameters.

user64896: It's just a simple moving average with a window of 30 blocks:
next_D = sum(past 30 D) / sum(past 30 solvetimes) * 600

This isn't exactly what it's doing, but it's darn close.

56108: <p>Bitcoin Gold claimed to have per-block difficulty adjustment, how does it work? I find this <a href="https://github.com/BTCGPU/BTCGPU/pull/151" rel="nofollow noreferrer">https://github.com/BTCGPU/BTCGPU/pull/151</a>, but still don't understand how it work by change some parameters.</p>
 64896: <p>It's just a simple moving average with a window of 30 blocks:</p>
<pre><code>next_D = sum(past 30 D) / sum(past 30 solvetimes) * 600
</code></pre>
<p>This isn't exactly what it's doing, but it's darn close.</p>
