<p>Bitcoin Core will never discard reorged blocks, until they are pruned (which happens regardless of whether the blocks are in the active chain or not).</p>
<p>Only one chain is considered &quot;active&quot; at a time though. The rules are:</p>
<ul>
<li>Only consider fully valid chains (i.e. if a block contains an invalid signature or anything else illegal, it is ignored, together with all its descendants).</li>
<li>Among those valid chains, only the one whose tip has the most accumulated work (roughly equal to the sum of the difficulties in the chain) is considered.</li>
<li>If there are multiple valid tips of equal accumulated work, the one whose last block was received first is considered active.</li>
</ul>
<p>All other chains are considered inactive, but if they get extended, they may end up becoming active again.</p>

CC BY-SA 4.0
2022-12-04T18:21:20.287Z
Thank you.
By pruning, do you mean the optional pruning mode to save disk space?
Yazid
CC BY-SA 4.0
2022-12-04T18:30:30.180Z
Yes, indeed. It just removes all old blocks past some threshold of age, regardless of whether they are part of the active chain or not.
Pieter Wuille
CC BY-SA 4.0
2022-12-04T17:54:40.263Z
2022-12-04T18:02:25.373Z
2022-12-04T18:02:25.373Z
Pieter Wuille
<p>When two blocks are mined and propagated at similar times times causing a fork, how long would a node store a stale chain until considered orphaned?</p>
<p><a href="https://i.sstatic.net/yw5M8.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/yw5M8.png" alt="enter image description here" /></a></p>
<p>How many blocks (work) are needed on chain I for chain H to be discarded?</p>

<blockchain-fork><chain-reorganization><block>
Bitcoin chain reorganization
Yazid
# Bitcoin chain reorganization

(Asked by: username_0 on 2022-12-04)

When two blocks are mined and propagated at similar times times causing a fork, how long would a node store a stale chain until considered orphaned?

[![enter image description here](https://i.sstatic.net/yw5M8.png)](https://i.sstatic.net/yw5M8.png)

How many blocks (work) are needed on chain I for chain H to be discarded?

**Tags:** blockchain-fork, chain-reorganization, block


---

## 1 answers

### Answer by username_1 on 2022-12-04. Score: 4 | Accepted answer

Bitcoin Core will never discard reorged blocks, until they are pruned (which happens regardless of whether the blocks are in the active chain or not).

Only one chain is considered "active" at a time though. The rules are:

* Only consider fully valid chains (i.e. if a block contains an invalid signature or anything else illegal, it is ignored, together with all its descendants).
* Among those valid chains, only the one whose tip has the most accumulated work (roughly equal to the sum of the difficulties in the chain) is considered.
* If there are multiple valid tips of equal accumulated work, the one whose last block was received first is considered active.

All other chains are considered inactive, but if they get extended, they may end up becoming active again.

> **Comments:**
> **username_0**: Thank you. By pruning, do you mean the optional pruning mode to save disk space?  
> **username_1**: Yes, indeed. It just removes all old blocks past some threshold of age, regardless of whether they are part of the active chain or not.  

---

