<blockquote>
  <p>My question is: does the client report stale blocks which are mined into the blockchain but not part of the main chain or are they ignored and hidden from me? </p>
</blockquote>

<p>Blocks that are not part of the main chain are never reported unless you specifically ask for them.</p>

<p>However if you are online, new blocks can become stale blocks and you will need to be able to handle that case.</p>

<blockquote>
  <p>what would I need to to with the transactions from that block?</p>
</blockquote>

<p>Undo everything that happened in that block. So all of the transactions become unconfirmed and go back to the mempool. Any UTXOs that were spent become unspent and re-enter the UTXO set.</p>

CC BY-SA 3.0
2018-04-13T20:18:08.783Z
Thank you for answering my question. How do I determine when a block (or multiple) has become stale?
androidu
CC BY-SA 3.0
2018-04-13T20:24:08.993Z
Maybe I should ask this as a separate post
androidu
CC BY-SA 3.0
2018-04-13T18:41:54.563Z
2018-04-13T18:41:54.563Z
Ava Chow
<p>Do <strong>stale blocks</strong> end up or get reported by bitcoin daemon client?
I am writing a bitcoin service and need to listen for incoming transactions for select accounts using the bitcoin client. For this I am watching the blocks as they come into the blockchain. And for periods of time the service is down, we keep track of the last block height and once the service is back online, restart traversing the blockchain from there until we catch up with the tip. </p>

<p>My questions are: </p>

<ol>
<li><p>Does the client report stale blocks which are mined into the blockchain but not part of the main chain or are they ignored and hidden from me? </p></li>
<li><p>Also if the stale blocks are being reported, what would I need to to with the transactions from that block? </p></li>
<li><p>How do I detect if a block is stale?</p></li>
</ol>

<bitcoind><client><stale-block>
Do stale blocks get reported by bitcoin daemon?
androidu
# Do stale blocks get reported by bitcoin daemon?

(Asked by: username_0 on 2018-04-13)

Do **stale blocks** end up or get reported by bitcoin daemon client?
I am writing a bitcoin service and need to listen for incoming transactions for select accounts using the bitcoin client. For this I am watching the blocks as they come into the blockchain. And for periods of time the service is down, we keep track of the last block height and once the service is back online, restart traversing the blockchain from there until we catch up with the tip.

My questions are:

1. Does the client report stale blocks which are mined into the blockchain but not part of the main chain or are they ignored and hidden from me?
2. Also if the stale blocks are being reported, what would I need to to with the transactions from that block?
3. How do I detect if a block is stale?

**Tags:** bitcoind, client, stale-block


---

## 1 answers

### Answer by username_1 on 2018-04-13. Score: 2

> My question is: does the client report stale blocks which are mined into the blockchain but not part of the main chain or are they ignored and hidden from me?

Blocks that are not part of the main chain are never reported unless you specifically ask for them.

However if you are online, new blocks can become stale blocks and you will need to be able to handle that case.

> what would I need to to with the transactions from that block?

Undo everything that happened in that block. So all of the transactions become unconfirmed and go back to the mempool. Any UTXOs that were spent become unspent and re-enter the UTXO set.

> **Comments:**
> **username_0**: Thank you for answering my question. How do I determine when a block (or multiple) has become stale?  
> **username_0**: Maybe I should ask this as a separate post  

---

