cryptochain
cryptochain copied to clipboard
Orphan blocks and stale blocks
Hi, I subscribed through your course. I was wondering what happens when a transaction is stored in a stale block. Your code is assuming if once blockchain is broadcasted, it will automatically be part of the longest blockchain. What happens when that blockchain is not accepted and the block becomes a stale block ? The transactions will be lost Thanks
Actually, if you are connected to other peers, then you allready broadcasted the transaction. so, it should be included in the winning block.