<blockquote>
  <p>But how is difficulty changes if suddenly 90% of hash rate disappears* ?</p>
</blockquote>

<p>It will change as it normally does, after 2016 blocks. There is no provision for adjusting the difficulty if the hashrate suddenly drops.</p>

<blockquote>
  <p>*recent BCH fork had difficulty adjusted quicker than 2016 blocks.</p>
</blockquote>

<p>As part of their hard fork, they added a provision for cases where blocks are taking too long (i.e. sudden hashrate drop). This extra difficulty changing rule is not present in Bitcoin.</p>

CC BY-SA 3.0
2017-08-22T18:09:03.757Z
2017-08-22T18:09:03.757Z
Ava Chow
<p>I do understand that the mining difficulty changes every 2016 blocks :</p>

<p>next_difficulty = (previous_difficulty * 2016 * 10 minutes) / (time to mine last 2016 blocks)</p>

<p>But how is difficulty changes if suddenly 90% of hash rate disappears* ?
I would be very grateful if someone could kindly point me to the class in sources.</p>

<p>*recent BCH fork had difficulty adjusted quicker than 2016 blocks.</p>

<p>P.S.
Should I be looking at</p>

<pre><code>unsigned int CalculateNextWorkRequired(const CBlockIndex* pindexLast, int64_t nFirstBlockTime, const Consensus::Params&amp; params)
</code></pre>

<p>in pow.cpp ? </p>

<difficulty><source-code>
Bitcoin difficulty re targeting in case of catastrophic hashrate drop?
CryingHippo
# Bitcoin difficulty re targeting in case of catastrophic hashrate drop?

(Asked by: username_0 on 2017-08-22)

I do understand that the mining difficulty changes every 2016 blocks :

next\_difficulty = (previous\_difficulty \* 2016 \* 10 minutes) / (time to mine last 2016 blocks)

But how is difficulty changes if suddenly 90% of hash rate disappears\* ?
I would be very grateful if someone could kindly point me to the class in sources.

\*recent BCH fork had difficulty adjusted quicker than 2016 blocks.

P.S.
Should I be looking at

```
unsigned int CalculateNextWorkRequired(const CBlockIndex* pindexLast, int64_t nFirstBlockTime, const Consensus::Params& params)

```

in pow.cpp ?

**Tags:** difficulty, source-code


---

## 1 answers

### Answer by username_1 on 2017-08-22. Score: 3 | Accepted answer

> But how is difficulty changes if suddenly 90% of hash rate disappears\* ?

It will change as it normally does, after 2016 blocks. There is no provision for adjusting the difficulty if the hashrate suddenly drops.

> \*recent BCH fork had difficulty adjusted quicker than 2016 blocks.

As part of their hard fork, they added a provision for cases where blocks are taking too long (i.e. sudden hashrate drop). This extra difficulty changing rule is not present in Bitcoin.


---

