Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: Painted_Red on June 12, 2014, 07:28:24 PM



Title: Orphan block hash
Post by: Painted_Red on June 12, 2014, 07:28:24 PM
For my testing purpose I need some orphan block.
https://blockchain.info/ru/orphaned-blocks give unknown exception.
There are no hashes in debug.txt.
I wonder if orphan blocks are being saved?


Title: Re: Orphan block hash
Post by: Dare on June 13, 2014, 02:49:25 AM
Orphan blocks are discarded since they're not part of the blockchain, and blocks don't get broadcasted across the network once they're orphaned either. Unless you can find a web service or pool that somehow archives them, I recommend mining on an old block with low difficulty so that you'll quickly solve an invalid block that you can use.

Out of curiosity, what are you testing that needs orphaned blocks?


Title: Re: Orphan block hash
Post by: Painted_Red on June 13, 2014, 05:42:48 AM
I'm writing my app using bitcoinj.
I need to test the scnario with orphan blocks.


Title: Re: Orphan block hash
Post by: dserrano5 on June 13, 2014, 06:42:19 AM
If you're running an instance of Bitcoin Core, you probably have some orphans within your block chain files. It's just a matter of extracting them ;).