Orphan block is a block that doesn't have a known parent in the longest block chain.
As I understand, this mean that orphaned block does not have a reference on it as "previous block hash" in any newest block. It is correct?
If yes, I make some research and does not understand why I get some strange results.
So, I extract all block hashes from raw dat files. Then I extract all "previous block hash" data from raw dat files. As a result I've got 2 arrays: block hashes (array A) and parent references (array B). Then if I subtract B from A, I would get a list of orphaned blocks.
Is it right way to get orphaned block list, or not?
P.S. I get this results after parsing dat files from blk00000.dat
to blk00953.dat
(I chose two blocks from the compiled list):
000000000000000003D57B69D1AC77F64287C893C16ADBC1816C6D7386CCC3C0 – orphaned
0000000000000000011523D7477DD274B7E0DCC2C616B2E2F584FFDEC20237D3 - main chain
main chain
and orphaned
are the status based on block explorer sites.
On this two blocks does not any reference as "previous" in raw dat files. I'am confused – "why?"